GutenBricks Events for Gutenberg Editor
Since v1.1
gb:block:init
jQuery(document).on('load gb:block:init', function(event) {
const { clientId, blockElement, block } = event.detail
console.log('block is initiated and ready to go', block.blockId);
// you can check if the event is triggered for the specific block
if (block.blockId === {gb_block_id}) {
console.log("I'm the block you're looking for!");
}
});
// OR
// you can use the dynamic data built specifically for event
// you can check out the dynamic data for events below
jQuery(document).on('{gb_event_block_load}', function(event) {
const { clientId, blockElement, block } = event.detail
console.log('block is initiated and ready to go', block.blockId);
});gb:block:removed
gb:block:prerendered
Dynamic Data For Events

GutenBricks Event: Block Load
GutenBricks Event: Block Remove
GutenBricks Event: Block Prerender
What's inside event.detail
clientId
domElement
block
Last updated