-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make CodeMirror the default editor #3560
Comments
@CalebJohn, those are the only three "blocking" issues I could think of. If you can think of any other issue that should be fixed before making CodeMirror the default, please let me know. |
I have a small list of known issues that I don't consider to be blocking.
One maybe more serious issue is that $ breaks the syntax highlighting (this is because it starts a katex block). The same thing happens with |
I agree the three issues you've listed would be nice to fix but not required to make the editor the default. The multicursor in particular is not really something we need to support. In fact would it make sense to disable the feature for now?
Do you have an example of Markdown code that would break? |
Remember to pay $10 for field trip
The rest of this not should use markdown **formatting** but it no longer works
# not even headers It's only broken in the codemirror editor of course, not the viewer.
As far as the list indenting (and other plugins) is concerned I'll probably just disable it since I'm sure users don't rely on it. |
@laurent22 All of these issues have now been addressed. What's the path forward? Should we wait for 1 more release of beta? I can make a pull swapping the default whenever we're ready for that. |
What is the motivation behind using CodeMirror? What does that solve? I can see some pluses (moving with Ctrl+left/right arrow is more logical), but some minuses as well, like lack of shortcut for duplicating a line (I suppose you can add it easily), breaking some userchrome.css, the issues above, and so on. Playing a bit with the editor, I see it manages Unicode characters better: I have a page of emoji followed by a tab followed by the meaning, Ace has issues moving between these, CM behaves better. |
@PhiLhoSoft Good question! Other major benefits include:
Overall Codemirror is easier to extend than ace (this is in part because we were relying on the react-ace wrapper). Looking into the future the Joplin project is planning on adding a plugin system which means it will be especially important to have an editor that is easier to configure/extend. Adding a shortcut for duplicating a line is already very easy with Codemirror and will be equally easy to add as a Joplin plugin (once those are available). You can see a bit of the discussion about the change in the original pull request |
Many thanks for detailing this. I didn't find an issue for this, so I hijacked this one… Unicode support is compelling for non-roman language users, indeed. And as I pointed out, Ace has issues with emoji, at least. So it is a good move. |
Yes looks like it's ready now so if you could make a pull request to make it default that would be great. We can keep the Ace Editor code in there for now, just in case, but I expect we'll delete it in a few versions. We need to switch to CodeMirror before the UI update as it means less components to update. |
This issue is to track the few remaining issues with CodeMirror that would need to be fixed before we can make it the default Markdown editor.
The text was updated successfully, but these errors were encountered: