springload / draftail

📝🍸 A configurable rich text editor built with Draft.js
https://www.draftail.org/
MIT License
613 stars 64 forks source link

Fix/call plugin keyBindingFns #445

Closed jacobtoppm closed 3 years ago

jacobtoppm commented 3 years ago

Currently, as described in https://github.com/springload/draftail/issues/246, Draftail does not call plugin keyBindingFns, preventing custom keyboard shortcuts from being used.

This PR addresses this by passing the Draftail keyBindingFn as an extra, final plugin to the plugin Editor component instead. This is done so that:

I haven't added this to the documentation yet - as it's just a fix, I'm not sure where it should go, but happy to add if you think it needs a mention somewhere. Tested in latest Chrome and Firefox on Ubuntu.