beforeEditorOpen

fires before the inline editor of an item is opened

boolean beforeEditorOpen(string|number id,string key,string|undefined subheaderId){ ... };

Parameters

idstring|numberthe id of the item
keystringthe name of the property to be edited
subheaderIdstring|undefinedoptional, the id of the edited subheader of a swimlane

Returns

booleanfalse - to block opening of the inline editor, otherwise true

Example

diagram.events.on("beforeEditorOpen", (id, key, subheaderId) => {
    console.log(id, key, subheaderId);
    return true;
});
 
// For diagram editor
editor.diagram.events.on("beforeEditorOpen", (id, key, subheaderId) => {
    console.log(id, key, subheaderId);
    return true;
});

Related samples

Change log

Added in v4.0

Back to top