nhsuk / wagtail-smartquotes

Smartquotes for the wagtail editor
0 stars 3 forks source link

Make it work on RichTextFields in Wagtail 2.x #1

Open tomdyson opened 5 years ago

tomdyson commented 5 years ago

Great plugin! It currently doesn't work on RichTextFields in Streamfields in Wagtail 2.x.

mikemonteith commented 5 years ago

I can create custom buttons with window.drafttail.registerPlugin, but I can't find a way to hook into draftail's (and draft-js) handleBeforeInput handler to do text replacement as a user types. Any ideas?

tomdyson commented 5 years ago

@thibaudcolas any ideas?

thibaudcolas commented 5 years ago

handleBeforeInput will be available for third-party extensions through https://github.com/springload/draftail/issues/83, which I've been working on.

I think those replacements should be a built-in feature of the editor though (https://github.com/springload/draftail/issues/113), thoughts and PRs welcome! 😬