Fire standard change event when transaction changes state

I’m integrating ProseMirror into a framework that expects the event normally generated by HTML5 inputs. In particular, I’d like for the widget that contains the PM editor to get a change event when I dispatch a transaction. It seems as though the way to do that would be to fire a change event from the dispatchTransaction property. Is that the best approach, or is there something already in ProseMirror to fire the standard events?

ProseMirror doesn’t fire its own events, so yes, if you want something like that you must implement it.

So what are the different methods provided by ProseMirror of hooking into changes?

So far I’ve found:

  • dispatchTransaction
  • update() in a plugin
1 Like

Those are all of them, pretty much.

1 Like