Reputation: 306
I'm wondering how can we disable the default undo/redo stack and implement our own so that whenever the user press Ctrl-Z, customUndo() function is called.
I'm building a real-time code collaborator and reimplementing undo/redo action is needed.
I have been looking up the documentation and the issues page on Github but didn't find much relevant information.
Please help!
Thank you
Upvotes: 1
Views: 1547
Reputation: 98
editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_Z, function() {
customUndo();
});
Upvotes: 2