How to deal with undomanager in ace editor Have under imports var UndoManager = require("ace/undomanager").UndoManager; var undoManager = new UndoManager(); Then add editor.getSession().setUndoManager(this.undoManager); Then for binding part use under method this._bindKeys = function(){ this.editor.commands.addCommands([ { name : 'undo', bindKey : 'Ctrl-Z', exec : function(editor){ editor.session.getUndoManager().undo(); } }, { name : 'redo', bindKey : 'Ctrl-Y', exec : function(editor){ editor.session.getUndoManager().redo(); } } ]); }; Call this method once during initiation to bind undo and redo You can also bind keys as bindKey: {win: "Ctrl-Z", mac: "Command-Z"}, for supporting mac