From 11c6d1735ee825a8bda514db0932967613e453a5 Mon Sep 17 00:00:00 2001 From: Minhyeok Park Date: Tue, 15 Oct 2024 18:47:27 +0900 Subject: [PATCH] feat: push undo state to undo stack when import string --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 3a73b5d..70fabd4 100644 --- a/index.html +++ b/index.html @@ -151,9 +151,10 @@ window.btn = (id) => { const text = document.getElementById(id).value - + editor.executeEdits('ptools', [{ identifier: 'delete', range: new monaco.Range(1, 1, 1000000000, 1), text: '', forceMoveMarkers: true }]); editor.executeEdits('ptools', [{ identifier: 'insert', range: new monaco.Range(1, 1, 1, 1), text, forceMoveMarkers: true }]); + editor.pushUndoStop() } try {