Exposing onDocumentChange to the plugins
See original GitHub issueHey @ianstormtaylor, I was going to build an autosave plugin that saves on debounced onDocumentChange
. Currently, I have that functionality in the onDocumentChange
method passed to the editor. And I’d like to move it to a plugin.
To do that, I’d need onDocumentChange
available to the plugins. Is that something you’d like as a PR? Are there any implications of this that you can foresee?
At a quick glance, it seems like this line here needs to call stack.onDocumentChange
.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
OnDocumentChange event not firing - Inventor
Solved: I can't figure out what I've got wrong here, I'm trying to create a handler for the OnDocumentChange Application event. private.
Read more >firestore_helper | Flutter Package - Pub.dev
Helper package which abstracts Firestore APIs and expose most reusable methods. ... onDocumentChange: (documentChange) { setState(() { switch ...
Read more >mathieudutour - Sketch Developers
The forum for developers working with Sketch Plugins and integrations. ... In Analytics in the plugin ... In onDocumentChange fullPath() ...
Read more >Elm - Visual Studio Marketplace
Elm Plugin for Visual Studio Code (VSCode) ... Codelenses show how many times you calling a function and if it's exposed or not ......
Read more >plugin – CodedBIM
today we're going to explore some of the tools that are exposed to us through the Revit API (Application programming interface), in order...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ianstormtaylor First off. I have to thank you for your work here with Slate. It’s so well done. I have a key project I’m working on that needed a flexible editor, and your approach is how I hope to see DraftJS core eventually go.
I do support the idea of getting rid of
onDocumentChange
in favor of allowing devs to use the built in React callbacks likecomponentDidUpdate
to decide when to serialize. It feels more natural to me after I saw your suggestion earlier in this thread.Thanks again for your work here.
lol I built exact same plugin, but used _.throttle() instead. Same issue. Will try both componentDidUpdate and
state.document != prevState.document
- thank you for exposing this info.