Events

Editor Ready #

This event is triggered when the editor is ready for use. It ensures that custom JavaScript, CSS, and fonts are fully loaded.
mailui.addEventListener('editor:ready', function () { // Perform your actions });

Design Loaded #

This event is triggered when your design is loaded in the editor.
mailui.addEventListener('design:loaded', function(data) { // Design is loaded var json = data.json; // design json });
PropertyDescriptionTypeDefault
jsonThis is the JSON of the designJSON

Design Updated #

This event is triggered whenever the user makes any changes in the editor. It can be utilized to set up auto-saving functionality.
mailui.addEventListener('design:updated', function(data) { // Design is updated by the user var type = data.type; // BODY, SECTION, ROW, COLUMN, ELEMENT var changes = data.changes; // Perform your actions });
PropertyDescriptionTypeDefault
typeThe type specifies what kind of data has changed.d
BODY SECTION ROW COLUMN ELEMENT
changesThe changes object contains the required properties: path, elementType, and data. It may also include additional optional properties.object

Explore Our Email Builder