Improve code injection dialog#2775
Open
guanglinn wants to merge 38 commits intogsantner:masterfrom
Open
Conversation
Contributor
Author
Screen recordingSVID_20260316_170402_1.mp4 |
Contributor
Author
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Hello, @gsantner
JavaScript and CSS code injection is a powerful feature for Markor, but the experience of using code injection dialog is very bad.
Related issues:
#2765 - Improve the user experience of code injection dialog
To solve these problems, this PR implemented the following features:
Major features are supported by CodeMirror: https://codemirror.net.
This is limited use of CodeMirror, it is only used in this code editing dialog.
These features can greatly enhance UX.
I learned that Obsidian and GitHub are all using CodeMirror, so it can be proven that CodeMirror is stable for production.
Some great features of CodeMirror:
Lightweight and efficient, the size of build files for Markor is only about 500 KB;
Multiple language support, see Language Support;
Highly customizable styles and themes extensions, see CodeMirror Styling Example;
Rich programming interface and extensions, see Extension;
Excellent performance and huge document support, see Huge Document Support: load a document with millions of lines;
Optimizing for mobile support, use the platform's native selection and editing features on phones;
Strong community support;
LICENSE.
CodeMirror development and build guidance for Markor
Who is using CodeMirror?
Sponsors