ohne blur

This commit is contained in:
2026-02-05 02:35:44 +01:00
parent fe45e51aa0
commit 4c680614f1
2 changed files with 11 additions and 2 deletions

View File

@@ -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) || '';