diff --git a/nnotepad/js/index.js b/nnotepad/js/index.js index 6f1c8685..dbc7c77e 100644 --- a/nnotepad/js/index.js +++ b/nnotepad/js/index.js @@ -24,6 +24,10 @@ document.addEventListener('DOMContentLoaded', async (e) => { disableMonospaceOptimizations: true, }); + editor.onDidChangeModelContent(() => { + refresh(); + }); + async function refresh(e) { const code = editor.getValue(); $('#output').innerText = ''; @@ -59,7 +63,6 @@ document.addEventListener('DOMContentLoaded', async (e) => { } } - $('#input').addEventListener('input', Util.debounce(refresh, 500)); $('#device').addEventListener('change', refresh); refresh();