From f4cac4dc1e3d9cc93bc1ac1a8e2826f189dd995b Mon Sep 17 00:00:00 2001 From: benStre Date: Tue, 8 Oct 2024 21:03:26 +0200 Subject: [PATCH] Allow textarea body --- datex-bindings/dom-utils.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/datex-bindings/dom-utils.ts b/datex-bindings/dom-utils.ts index fed2ddf..7923996 100644 --- a/datex-bindings/dom-utils.ts +++ b/datex-bindings/dom-utils.ts @@ -83,6 +83,7 @@ export class DOMUtils { html = html.trim(); template.innerHTML = html; const element = template.content.firstChild; + if (content != undefined) { // set html if (Datex.ReactiveValue.collapseValue(content,true,true) instanceof this.context.HTMLElement) this.setElementHTML(element, content); @@ -154,7 +155,7 @@ export class DOMUtils { // unobserve? this.element_bound_html_values.get(element)?.unobserve(element); this.element_bound_text_values.get(element)?.unobserve(element); - + // @ts-ignore markdown flag element._use_markdown = markdown; @@ -163,6 +164,7 @@ export class DOMUtils { // Datexv Ref else if (text instanceof Datex.ReactiveValue) { + this.updateElementText.call(element, text.val); text.observe(this.updateElementText, element); @@ -288,6 +290,15 @@ export class DOMUtils { // use content if parent is