Skip to main content



Fires before the text value of an item is edited via the inline editor


beforeEditorEditing: (
value: string,
currentValue: string,
id: string | number,
key: string,
subId?: string
) => boolean | void;


The callback of the event takes the following parameters:

  • value - (required) the new value of the item
  • currentValue - (required) the old value of the item
  • id - (required) the id of the item
  • key - (required) the name of the property to be edited
  • subId - (optional) the id of a subheader of a swimlane or a text element of a line


Return false to block saving changes after editing an item via the inline editor, otherwise true


// initializing Diagram
const diagram = new dhx.Diagram("diagram_container", {
type: "default"
// loading data;

// attaching a handler to the event"beforeEditorEditing", (value, id, key, subId) => {
console.log(value, id, key, subId);
return true;

Change log:

  • The subHeaderId parameter has been changed to subId in v4.1
  • Added in v4.0

Related samples: