From 5f7a25dbab6c25ac07a0e3f374bd8fe319367f88 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Thu, 29 Jan 2026 00:18:25 +0100 Subject: [PATCH] sss --- config/current.ver | 2 +- public/assets/js/bridge/rte-editor.js | 1 + public/editor/bridge-core.js | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config/current.ver b/config/current.ver index 472b581..8eefee3 100644 --- a/config/current.ver +++ b/config/current.ver @@ -1 +1 @@ -1.1.50 \ No newline at end of file +1.1.51 \ No newline at end of file diff --git a/public/assets/js/bridge/rte-editor.js b/public/assets/js/bridge/rte-editor.js index da3f709..61ac882 100644 --- a/public/assets/js/bridge/rte-editor.js +++ b/public/assets/js/bridge/rte-editor.js @@ -150,6 +150,7 @@ logConsoleSnapshot(editor, component, label) { try { + if (!this.B || !this.B.DEBUG_RTE) return; const viewEl = component && component.view ? component.view.el : null; const modelContent = component && component.get ? String(component.get('content') || '') : ''; const editorHtml = editor && typeof editor.getHtml === 'function' ? String(editor.getHtml() || '') : ''; diff --git a/public/editor/bridge-core.js b/public/editor/bridge-core.js index 95a7db6..bbbd607 100644 --- a/public/editor/bridge-core.js +++ b/public/editor/bridge-core.js @@ -332,6 +332,7 @@ // RichText-Editor ausgelagert nach /assets/js/bridge/rte-editor.js const setupPlainTextPreserver = (editor) => { + const DEBUG_UI = !!(B && B.DEBUG_UI); const isTextLike = (model) => !!(model && model.is && (model.is('text') || model.is('button') || model.is('link') || model.is('textnode'))); const resolveTextModel = (model) => { if (!model) return model; @@ -444,7 +445,9 @@ try { target.set('content', stored.html); target.trigger && target.trigger('change:content'); - try { console.log('[PLAIN TEXT RESTORE] Inhalt wiederhergestellt.'); } catch {} + try { + if (DEBUG_UI) console.log('[PLAIN TEXT RESTORE] Inhalt wiederhergestellt.'); + } catch {} } catch {} }; const ensureViewMatchesModel = (model) => { @@ -547,6 +550,7 @@ const setupBlurLogger = (editor) => { if (!editor || !editor.Canvas || !editor.Canvas.getBody) return; + const DEBUG_UI = !!(B && B.DEBUG_UI); const getModelHtmlForLog = (model) => { if (!model) return ''; let html = ''; @@ -576,6 +580,7 @@ }; const logComponentInput = (model, label) => { try { + if (!DEBUG_UI) return; const modelType = model && model.get ? model.get('type') : undefined; let selectedEl = model && model.view && model.view.el; if (!selectedEl && editor && editor.Canvas && editor.Canvas.getBody) { @@ -711,6 +716,7 @@ const isEditable = !!(target.isContentEditable || (target.getAttribute && target.getAttribute('contenteditable') === 'true')); if (!isEditable) return; syncFromBlur(evt); + if (!DEBUG_UI) return; const selected = editor.getSelected && editor.getSelected(); const selectedEl = selected && selected.view && selected.view.el; const inSelected = !!(selectedEl && (selectedEl === target || selectedEl.contains(target)));