From 55dbd82ca70e7e641e1ee624f77a739b2c648a93 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Fri, 16 Jan 2026 22:46:17 +0100 Subject: [PATCH] asdasd --- public/assets/js/bridge/rte-editor.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/public/assets/js/bridge/rte-editor.js b/public/assets/js/bridge/rte-editor.js index f1ea16e..a737a24 100644 --- a/public/assets/js/bridge/rte-editor.js +++ b/public/assets/js/bridge/rte-editor.js @@ -290,11 +290,16 @@ saveBtn.style.color = '#ffffff'; saveBtn.style.cursor = 'pointer'; saveBtn.addEventListener('click', () => { - const html = content.innerHTML; + let html = String(content.innerHTML || '').trim(); const isTextLike = component && component.is && (component.is('text') || component.is('button') || component.is('link')); - const hasTags = /<[^>]+>/.test(html); + if (!html) { + const fallbackText = String(content.textContent || '').trim(); + if (fallbackText) { + html = fallbackText.replace(//g, '>'); + } + } try { - if (component.components) { + if (!isTextLike && component.components) { component.components(html); } if (component.set) {