From ac7dd71a65c70c82c8d7279917fdee2a0fd30d23 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Fri, 16 Jan 2026 01:01:40 +0100 Subject: [PATCH] Blur ausbau --- public/assets/js/bridge/blocks-placeholder.js | 1 - public/editor/bridge-core.js | 12 +++++++----- public/editor/editor-core.php | 1 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/assets/js/bridge/blocks-placeholder.js b/public/assets/js/bridge/blocks-placeholder.js index 31d188b..fa1f6a9 100644 --- a/public/assets/js/bridge/blocks-placeholder.js +++ b/public/assets/js/bridge/blocks-placeholder.js @@ -602,7 +602,6 @@ const refreshPlaceholderComponent = (component) => { }; const ensureRtePlaceholderButton = (editor) => { - if (B.RTE_TEXTFIELDS_ENABLED === false) return; const rte = editor && editor.RichTextEditor; if (!rte || rte.__bridgePlaceholderButton) return; diff --git a/public/editor/bridge-core.js b/public/editor/bridge-core.js index 855968e..004b280 100644 --- a/public/editor/bridge-core.js +++ b/public/editor/bridge-core.js @@ -616,11 +616,6 @@ const setupRichTextEditor = (editor) => { if (!editor || !editor.RichTextEditor) return; const rte = editor.RichTextEditor; - const enableTextRte = B.RTE_TEXTFIELDS_ENABLED !== false; - if (!enableTextRte) { - log('RTE', 'Richtext fuer Textfelder deaktiviert (RTE bleibt geladen).', '#888'); - return; - } const icon = (path) => ``; const resolveFontOptions = () => (B.RTE_FONTS && Array.isArray(B.RTE_FONTS) && B.RTE_FONTS.length) ? B.RTE_FONTS @@ -745,6 +740,13 @@ } }, true); }); + editor.on('rte:disable', (model) => { + const target = model || (editor.getSelected && editor.getSelected()); + if (!isTextLike(target)) return; + const content = target && target.get ? target.get('content') : ''; + const msg = String(content || '').trim() ? 'Content vorhanden' : 'Content leer'; + log('RTE BLUR', `rte:disable fuer Text-Komponente: ${msg}`, '#888'); + }); }; const setupPlainTextPreserver = (editor) => { diff --git a/public/editor/editor-core.php b/public/editor/editor-core.php index 0778d83..63d0246 100644 --- a/public/editor/editor-core.php +++ b/public/editor/editor-core.php @@ -65,7 +65,6 @@ if ($fontSources) { { label: 'Verdana', value: 'Verdana, sans-serif' }, ]; window.BridgeParts.RTE_FONT_FACE_CSS = window.BridgeParts.RTE_FONT_FACE_CSS || ; - window.BridgeParts.RTE_TEXTFIELDS_ENABLED = window.BridgeParts.RTE_TEXTFIELDS_ENABLED ?? false; function logToParent(type, detail){ try{ parent.postMessage({source:'editor-core',type:type,detail:String(detail||'')},'*'); }catch(e){} } window.addEventListener('error', function(e){