diff --git a/src/ui/editor/editor.js b/src/ui/editor/editor.js index 4e04106..4935d5d 100644 --- a/src/ui/editor/editor.js +++ b/src/ui/editor/editor.js @@ -74,9 +74,7 @@ export function initEditor() { } export function getCode() { - return currentTextValue.map(function (x) { - return x.replaceAll("\n", ""); - }).join("\n"); + return Array.from(code.children, (d) => d.textContent).join("\n") } export function setCode(text) {