hawkerm / monaco-editor-uwp

A Windows Runtime Component wrapper around the web-based Monaco Editor.
MIT License
152 stars 36 forks source link

Add undo/redo commands #70

Open TyJOrtiz opened 2 years ago

TyJOrtiz commented 2 years ago

I was wondering if you could implement undo/redo commands

CodeEditor.Undo();

method:

var result = await this.InvokeScriptAsync(@"function runUndo() { editor.getModel().undo(); }; runUndo();");

CodeEditor.Redo();

method:

var result = await this.InvokeScriptAsync(@"function runRedo() { editor.getModel().redo(); }; runRedo();");