Is there a way to know that current bpmn has changed

Hello

Is there an event I can subscribe to know the current bpmn xml has changed ?

Maybe elements.changed ?

Or maybe a mehtod I can call ?

My use case is the following, I have a save button and I want to be disabled until the bpmn has changed

Here is what I did

    this.bpmnModeler.on('elements.changed', () => {
      this.didBpmnChange = true;
    });

    this.bpmnModeler.on('import.render.complete', () => {
      this.didBpmnChange = true;
    });

Glad you figured it out yourself. For comparison, here’s how we do it in Camunda Modeler:

Hello @jarekdanielak

Thank you for your answer, can you please quickly explain the logic or what is stackIdx ?