Skip to content
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

Support the CodeMirror 6 beta editor #58

Merged
merged 1 commit into from
Feb 15, 2024

Conversation

personalizedrefrigerator
Copy link
Contributor

@personalizedrefrigerator personalizedrefrigerator commented Feb 14, 2024

Summary

Adds more complete support for the CodeMirror 6 beta editor.

Screen recording

untitled.mp4

Notes

  • The plugin's list indentation functionality still doesn't work.
  • With Desktop: Improve beta editor support for the Rich Markdown plugin laurent22/joplin#9935, the CodeMirror 6 editor has both cm-editor and CodeMirror classes. The CodeMirror 5 editor has only CodeMirror.
  • tok-meta seems to include bold, italic, and header markings.
  • CodeMirror 6 has only one wrapper element per line. As such, CodeMirror-activeline-background and CodeMirror-activeline apply to the same element.
  • Locally, I had to update the Joplin plugin template to build the plugin. These changes were not committed.

@CalebJohn
Copy link
Owner

Thanks for this! I've been looking forward to your CodeMirror 6 work for awhile.

What's the upgrade plan on the Joplin side? Eventually I would like to drop Codemirror 5 compat and bump the min version of this plugin. Is the current plan to have both exist side-by-side for awhile?

@personalizedrefrigerator
Copy link
Contributor Author

personalizedrefrigerator commented Feb 15, 2024

What's the upgrade plan on the Joplin side? Eventually I would like to drop Codemirror 5 compat and bump the min version of this plugin. Is the current plan to have both exist side-by-side for awhile?

If everything goes well, the CodeMirror 6 editor will be the default editor for Joplin version 3.0. The current plan is to keep the CodeMirror 5 editor for a few versions as an opt-in through settings. The compatibility layer will likely be kept for longer, but not indefinitely.

@CalebJohn
Copy link
Owner

Thanks @personalizedrefrigerator! This looks good. I'll hold off gutting Codemirror 5 support for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants