DMN Modeler undo/redo

The minified TryOut demo of dmn-js supports Undo on Ctlr+Z, but the modeler example doesn’t.

I have tried to follow the advice at https://forum.bpmn.io/t/undo-redo-not-working/656:

var dmnJS = new DmnModeler({
	container: '#canvas',
	keyboard: { bindTo: document }
});

But that had no effect. Since the tryout demo is minified, it is difficult to see what goes on. Is the demo available as src somewhere? What do I need to do to enable Undo/Redo for dmn-js?

dmn-js has been rewritten in the meantime. It now consists of multiple editors that can be configured independently from each other.

Common configurations can be provided using common:

var dmnJS = new DmnModeler({
  container: '#canvas',
  common: {
    keyboard: {
      bindTo: document
    }
  }
});
1 Like

Thank you, that solved it!

1 Like