Listening for any changes to the editor state

Hey there,

I’m trying to create an event listener which gets triggered whenever the content in the editor changes. E.g. typing text, pasting, adding styles, etc.

Looking at the docs, I haven’t seen any handler that does this. Any ideas?

1 Like

You’ll have to look at transactions, specifically their docChanged property.

Thanks @marijn :+1:

For anyone who’s looking for a quick solution, I ended up using the dispatchTransaction prop from the guide.

2 Likes