-
Notifications
You must be signed in to change notification settings - Fork 13
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
Formatting bar: Add support for CodeMirror 6 #65
Formatting bar: Add support for CodeMirror 6 #65
Conversation
In some cases, the color selection buttons don't seem to work. I'm converting this pull request to a draft until that is resolved. Edit: This was caused by a bug in the beta editor's CodeMirror 5 emulation. This pull request works around it by using the Joplin-provided API for registering commands in the beta editor. |
// FIXME(for:cm6): Disabled because the following logic is broken in | ||
// the CM6 editor. | ||
if (cm.cm6) { | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now (on CodeMirror 6), I've disabled several parts of the plugin that fail to load in CodeMirror 6.
The Quick Commands extension uses functionality not available through Joplin's CodeMirror 5 emulation. Thus, it will be disabled in Joplin's CodeMirror 6-based beta editor until it can be ported separately.
Thank you for the PR! I tested the branch and found that all features of the plugin are not working under Joplin version 2.14.16, and the following error appeared in the developer tools:
Could it be that an error occurred during the process of running |
I've made the CodeMirror 6 requires dynamic rather than static (see commit). I suspect that Interestingly, the |
Summary
This pull request builds on #64 to allow the formatting bar to work with CodeMirror 6.
Notes
Tooltip.offset
property, but will require extra work to ensure that the formatting bar does not go offscreen.Testing
Additional testing (done later):
Screen recording
enhancement-formatting-bar.mp4