Skip to content

Conversation

@sambenne
Copy link

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

@sambenne
Copy link
Author

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"
}

@Ionaru
Copy link
Owner

Ionaru commented Oct 11, 2023

This looks great! I'm gonna do some testing and add the typings soon!

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.

2 participants