Skip to content
Vlad Mitkovsky edited this page Feb 26, 2020 · 2 revisions

Custom JS Events in Live Composer

pageCodeUpdated

This event gets dispatched when the raw (JSON) code of the page changes. Useful when you need to rerender some components when the page updated.

Usage example (from a third-party plugin):

parent.document.addEventListener( 'pageCodeUpdated', function ( customEvent ) {
	console.log( "This message appears after page code updated" );
});`

contentEditableFocusOut

This event gets dispatched when the contenteditable element loses focus. Useful when you need to save data when element text edited.

Usage example (from a third-party plugin):

parent.document.addEventListener( 'contentEditableFocusOut', function ( customEvent ) {
	console.log( "This message appears after contenteditable element loses focus" );
});`

Clone this wiki locally