feat: push undo state to undo stack when import string
This commit is contained in:
parent
116d4173aa
commit
11c6d1735e
@ -151,9 +151,10 @@
|
|||||||
|
|
||||||
window.btn = (id) => {
|
window.btn = (id) => {
|
||||||
const text = document.getElementById(id).value
|
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: '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.executeEdits('ptools', [{ identifier: 'insert', range: new monaco.Range(1, 1, 1, 1), text, forceMoveMarkers: true }]);
|
||||||
|
editor.pushUndoStop()
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user