This sample demonstrates the events that trigger on every action of the Block Editor. The event details are showcased in the event trace panel.
DEMO
SOURCE
|
|
|
|
The Block Editor triggers events based on its actions. These events can be used as extension points to perform custom operations.
created- Triggers after the Block Editor is rendered completely.blockChanged- Triggers when the editor blocks are changed. This event provides details about the changes made to the blocks, including insertions, deletions, movements, and updates.selectionChanged- Triggers when the selection in the block editor changes.blockDragging- Triggers during the dragging operation of a block.blockDragStart- Triggers when the drag operation for a block starts.blockDropped- Triggers when a block is dropped after a drag operation.focus- Triggers when the block editor gains focus.blur- Triggers when the block editor loses focus.beforePasteCleanup- Triggers before pasting the content in the block editor.afterPasteCleanup- Triggers after pasting the content in the block editor.