Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Add editor initialization script#3798

Open
shriram-svg wants to merge 1 commit into
BoostIO:masterfrom
shriram-svg:fix-3119-editor-init-script
Open

Add editor initialization script#3798
shriram-svg wants to merge 1 commit into
BoostIO:masterfrom
shriram-svg:fix-3119-editor-init-script

Conversation

@shriram-svg
Copy link
Copy Markdown

Fixes #3119.

Summary:

  • Adds an Editor initialization script preference backed by CodeMirror in the UI settings tab.
  • Runs the saved script after CodeMirror/Vim setup for full and split markdown editors.
  • Exposes CodeMirror, editor, and cm aliases to the script and catches startup errors.

Tests:

  • ./node_modules/.bin/jest tests/lib/editor-initialization-script.test.js --runInBand
  • ./node_modules/.bin/eslint browser/components/CodeEditor.js browser/main/lib/ConfigManager.js browser/lib/editorInitializationScript.js tests/lib/editor-initialization-script.test.js
  • ./node_modules/.bin/prettier --check browser/components/CodeEditor.js browser/components/MarkdownEditor.js browser/components/MarkdownSplitEditor.js browser/main/lib/ConfigManager.js browser/main/modals/PreferencesModal/UiTab.js browser/lib/editorInitializationScript.js tests/lib/editor-initialization-script.test.js
  • git diff --check

Note: direct linting of UiTab.js/MarkdownSplitEditor.js is still blocked by the repository's existing react/no-unknown-property errors around the styleName CSS modules pattern.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support initialization script

2 participants