easy-markdown-editor
easy-markdown-editor copied to clipboard
Add method to allow the adding of custom bindings
I wanted to add a new keyboard shortcut but was unable to. This is because the list of bindings was set and no way to update it. This change adds a method that allows the user to add new bindings so you can have custom keyboard shortcuts
So for instance you can then do:
EasyMDE.prototype.addBinding('submitModal', keyboardAction);
Then when you are creating the instance you can do:
shortcuts: {
"submitModal": "Ctrl-Enter"
}
This looks great! I'm gonna do some testing and add the typings soon!