Undo, redo button

I want to customize using the function of top pannel in diagram edior.
For example, how do you use a function like redo, undo in diagram editor ?

editor.redo(); —> undefined error

document.querySelector(‘.undo .dxi .dxi-undo’).click(); → Implementation using the corresponding class only works once

.

Hello.

Please, try to use the redo() and undo() methods of the diagram editor: