diff --git a/frontend/src/lib/components/SimpleEditor.svelte b/frontend/src/lib/components/SimpleEditor.svelte index 7cd0c4a5fd..fbea79f20b 100644 --- a/frontend/src/lib/components/SimpleEditor.svelte +++ b/frontend/src/lib/components/SimpleEditor.svelte @@ -90,6 +90,7 @@ editor.getAction('editor.action.formatDocument').run() if (formatAction) { formatAction() + code = getCode() } } } @@ -111,6 +112,7 @@ editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter, function () { if (cmdEnterAction) { + code = getCode() cmdEnterAction() } }) @@ -130,6 +132,7 @@ }) editor.onDidBlurEditorText(() => { + code = getCode() dispatch('blur') })