Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.31k stars 308 forks source link

Provide a way to customise keyboard shortcuts on CodeMirror #556

Open tadayosi opened 10 months ago

tadayosi commented 10 months ago

Is your feature request related to a problem? Please describe. EasyMDE provides a way to customise the default keyboard shortcuts here: https://github.com/Ionaru/easy-markdown-editor#keyboard-shortcuts However, the defined actions don't cover what are defined in underlying CodeMirror, thus for instance shortcuts such as Ctrl+A (selectAll) cannot be customised.

Describe the solution you'd like Provide a way to also customise the keyboard shortcuts https://codemirror.net/5/doc/manual.html#keymaps on CodeMirror from EasyMDE.

Describe alternatives you've considered If it's already possible in some way (e.g. #124), then add explanation to the documentation on how to do so.

Additional context This might be related or even a duplicate of #124, and someone suggested a solution (not sure if it works) https://github.com/Ionaru/easy-markdown-editor/issues/124#issuecomment-596619936. So it could be that easyMDE.codemirror is the way to go, but I'd like to make sure that it really works if it is.