From d03c4a5d10d6d4484501cf350f816e000e297a1d Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Mon, 26 Jan 2026 00:01:27 +0100 Subject: [PATCH] ydsad --- public/assets/js/bridge/rte-editor.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/public/assets/js/bridge/rte-editor.js b/public/assets/js/bridge/rte-editor.js index c9aea41..c9f02c3 100644 --- a/public/assets/js/bridge/rte-editor.js +++ b/public/assets/js/bridge/rte-editor.js @@ -15,7 +15,24 @@ static serializeHtml(editor) { if (!editor || typeof editor.getHtml !== 'function') return ''; - let html = editor.getHtml(); + let html = editor.getHtml() || ''; + if (!html) { + try { + const wrapper = editor.getWrapper && editor.getWrapper(); + if (wrapper && typeof wrapper.toHTML === 'function') { + html = wrapper.toHTML(); + } + } catch {} + } + if (!html) { + try { + const wrapper = editor.getWrapper && editor.getWrapper(); + const el = wrapper && wrapper.view && wrapper.view.el ? wrapper.view.el : null; + if (el && el.innerHTML) { + html = String(el.innerHTML || ''); + } + } catch {} + } try { const wrapper = editor.getWrapper && editor.getWrapper(); if (wrapper && wrapper.find) {