Idea for making keydownHandler reusable outside ProseMirror #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hey there, since I'm using ProseMirror heavily in my application, I figured it makes sense to use the same keyboard shortcut handling in the rest of my application (navigating menus and stuff outside of ProseMirror).
I was hoping this would end up with a cleaner abstraction (its a little gross having to call
callBindingsWithViewevery time), but maybe you might think of better way to do it so I can reuse this logic elsewhere.Cheers,
Chet
Sorry, but I don't think this is a good idea. It's going to copy, bind, and normalize all handlers on every key press. We could have set up the abstractions differently to allow this more elegantly, but at this point I think just duplicating the logic you need in your own code is the more reasonable approach.
Pull request closed