This commit is contained in:
2026-01-16 00:57:05 +01:00
parent b2bc58b9d8
commit bb95e4382d
3 changed files with 7 additions and 0 deletions

View File

@@ -602,6 +602,7 @@ const refreshPlaceholderComponent = (component) => {
}; };
const ensureRtePlaceholderButton = (editor) => { const ensureRtePlaceholderButton = (editor) => {
if (B.RTE_TEXTFIELDS_ENABLED === false) return;
const rte = editor && editor.RichTextEditor; const rte = editor && editor.RichTextEditor;
if (!rte || rte.__bridgePlaceholderButton) return; if (!rte || rte.__bridgePlaceholderButton) return;

View File

@@ -616,6 +616,11 @@
const setupRichTextEditor = (editor) => { const setupRichTextEditor = (editor) => {
if (!editor || !editor.RichTextEditor) return; if (!editor || !editor.RichTextEditor) return;
const rte = editor.RichTextEditor; 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) => `<svg viewBox="0 0 24 24" width="14" height="14" aria-hidden="true"><path d="${path}" fill="currentColor"/></svg>`; const icon = (path) => `<svg viewBox="0 0 24 24" width="14" height="14" aria-hidden="true"><path d="${path}" fill="currentColor"/></svg>`;
const resolveFontOptions = () => (B.RTE_FONTS && Array.isArray(B.RTE_FONTS) && B.RTE_FONTS.length) const resolveFontOptions = () => (B.RTE_FONTS && Array.isArray(B.RTE_FONTS) && B.RTE_FONTS.length)
? B.RTE_FONTS ? B.RTE_FONTS

View File

@@ -65,6 +65,7 @@ if ($fontSources) {
{ label: 'Verdana', value: 'Verdana, sans-serif' }, { label: 'Verdana', value: 'Verdana, sans-serif' },
]; ];
window.BridgeParts.RTE_FONT_FACE_CSS = window.BridgeParts.RTE_FONT_FACE_CSS || <?= json_encode($fontFaceCss) ?>; window.BridgeParts.RTE_FONT_FACE_CSS = window.BridgeParts.RTE_FONT_FACE_CSS || <?= json_encode($fontFaceCss) ?>;
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){} } function logToParent(type, detail){ try{ parent.postMessage({source:'editor-core',type:type,detail:String(detail||'')},'*'); }catch(e){} }
window.addEventListener('error', function(e){ window.addEventListener('error', function(e){