Adding Event Listeners
Hi everyone, please let me know if this already exists otherwise I may do a pull request to add the functionality.
In order to use this editor as a multi collaboration tool I need to use block interactions as transactions. To facilitate this I need to listen for events from the editor that do the following.
removeOp - When a block has been removed from the editor moveOp - When a block has been moved in the editor insertOp - When a block has been inserted. replaceOp - When a block changes its type editOp - When a block has been edited.
What do you think
Would be great
that good!
Have you implemented this functionality? I guess it would be useful for other developers and for tasks like #1780.
Resolved by #1791 in 2.23.0
The editor's onChange callback now accepts CustomEvent describing what happened with block.
This CustomEvent has:
type — mutation type (Added, Removed, Moved, Changed)
details.block — changed Block API
details.* — additional data