From bc03561b44aa54a31bd3ab7445a4e6efdce139f2 Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Fri, 30 Jan 2026 23:52:10 +0100 Subject: [PATCH] yssdsad --- config/current.ver | 2 +- public/editor/bridge-core.js | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/config/current.ver b/config/current.ver index c8e347b..984b51a 100644 --- a/config/current.ver +++ b/config/current.ver @@ -1 +1 @@ -1.1.64 \ No newline at end of file +1.1.65 \ No newline at end of file diff --git a/public/editor/bridge-core.js b/public/editor/bridge-core.js index 76d5a7f..80408c0 100644 --- a/public/editor/bridge-core.js +++ b/public/editor/bridge-core.js @@ -879,6 +879,32 @@ } }); + const configureInlineRte = (editor) => { + try { + const rte = editor && editor.RichTextEditor; + if (!rte) return; + const allowed = new Set(['bold', 'italic', 'underline', 'placeholder', 'bridge-placeholder', 'bridge-placeholder:edit']); + const getId = (action) => { + if (!action) return ''; + if (action.id) return action.id; + if (typeof action.getId === 'function') return action.getId(); + if (action.get && action.get('id')) return action.get('id'); + return ''; + }; + const all = typeof rte.getAll === 'function' ? rte.getAll() : (rte.actions || []); + if (Array.isArray(all)) { + all.forEach((action) => { + const id = getId(action); + if (!id) return; + if (allowed.has(id) || String(id).toLowerCase().includes('placeholder')) return; + if (typeof rte.remove === 'function') { + rte.remove(id); + } + }); + } + } catch {} + }; + const ensureCommandStubs = (editor) => { if (!editor || !editor.Commands || !editor.Commands.add) return; editor.Commands.add('bridge-placeholder:edit', { @@ -941,6 +967,7 @@ if (B.ENABLE_EDITOR_EXTENSIONS !== false && B.ENABLE_EDITOR_BEHAVIOR !== false) { setupPlainTextPreserver(ed); } + configureInlineRte(ed); setupBlurLogger(ed); loadDynamicFonts();