From 4c680614f1ff062d16e94752d37fb55857cfe351 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Thu, 5 Feb 2026 02:35:44 +0100 Subject: [PATCH] ohne blur --- config/current.ver | 2 +- public/assets/js/bridge/blocks-api.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config/current.ver b/config/current.ver index 7b330ae..7664e79 100644 --- a/config/current.ver +++ b/config/current.ver @@ -1 +1 @@ -1.2.56 \ No newline at end of file +1.2.57 \ No newline at end of file diff --git a/public/assets/js/bridge/blocks-api.js b/public/assets/js/bridge/blocks-api.js index 66ec12f..d70c53d 100644 --- a/public/assets/js/bridge/blocks-api.js +++ b/public/assets/js/bridge/blocks-api.js @@ -611,7 +611,16 @@ : ''; const cssPayload = (fontCss ? fontCss + '\n' : '') + editor.getCss(); const serializeHtml = () => { - const rawHtml = editor.getHtml() || ''; + let rawHtml = editor.getHtml() || ''; + try { + const doc = editor.Canvas && editor.Canvas.getDocument ? editor.Canvas.getDocument() : null; + const body = doc && doc.body; + const liveHtml = body ? String(body.innerHTML || '') : ''; + if (liveHtml && liveHtml.length >= rawHtml.length * 0.8) { + // Remove contenteditable artifacts from live DOM HTML + rawHtml = liveHtml.replace(/\scontenteditable="[^"]*"/gi, ''); + } + } catch {} if (B && B.BridgeRTE && typeof B.BridgeRTE.serializeHtml === 'function') { try { let patched = B.BridgeRTE.serializeHtml(editor) || '';