diff --git a/web/src/elements/CodeMirror.ts b/web/src/elements/CodeMirror.ts index 3c3db67a6..6d1c7381b 100644 --- a/web/src/elements/CodeMirror.ts +++ b/web/src/elements/CodeMirror.ts @@ -44,14 +44,10 @@ export class CodeMirrorTextarea extends LitElement { } private getInnerValue(): string { - if (!this.shadowRoot) { + if (!this.editor) { return ""; } - const ta = this.shadowRoot?.querySelector("textarea"); - if (!ta) { - return ""; - } - return ta.value; + return this.editor.getValue(); } static get styles(): CSSResult[] {