Config enabledisable

This commit is contained in:
2026-01-16 02:53:30 +01:00
parent 1eb18c8036
commit b63089a4fa
2 changed files with 18 additions and 15 deletions

View File

@@ -149,16 +149,16 @@
            base + 'categorization-cleanup.js',
        ];
        const initialLoadList = B.DISABLE_EDITOR_EXTENSIONS
            ? [base + 'general-functions.js']
            : [...coreFiles];
        const initialLoadList = B.ENABLE_EDITOR_EXTENSIONS === false
             ? [base + 'general-functions.js']
             : [...coreFiles];
        
        function recursiveLoader(list, index = 0) {
            if (index >= list.length) {
                log('LOAD END', 'Initial-Bridge-Skripte geladen.', 'green');
                if (B.DISABLE_EDITOR_EXTENSIONS) {
                    return cb && cb(B);
                }
                if (B.ENABLE_EDITOR_EXTENSIONS === false) {
                     return cb && cb(B);
                 }
                
                const config = window.BridgeParts?.CATEGORY_CONFIG || {};
                let allBlockFiles = [];
@@ -254,7 +254,7 @@
let pluginsList = [
safetyPlugin,
];
if (!B.DISABLE_EDITOR_EXTENSIONS) {
if (B.ENABLE_EDITOR_EXTENSIONS !== false) {
pluginsList.push(
// 🛑 KRITISCHE ERGÄNZUNG: Aktiviert das registrierte API-Plugin
'bridge-blocks-api',
@@ -1216,11 +1216,11 @@
},
});
};
if (!B.DISABLE_EDITOR_EXTENSIONS && !B.DISABLE_EDITOR_BEHAVIOR) {
if (B.ENABLE_EDITOR_EXTENSIONS !== false && B.ENABLE_EDITOR_BEHAVIOR !== false) {
ensureCommandStubs(ed);
}
if (!B.DISABLE_EDITOR_EXTENSIONS && !B.DISABLE_EDITOR_BEHAVIOR) {
if (B.ENABLE_EDITOR_EXTENSIONS !== false && B.ENABLE_EDITOR_BEHAVIOR !== false) {
try {
const textTags = ['p','span','div','br','b','strong','i','em','u','a','ul','ol','li'];
if (ed.Config) {
@@ -1242,8 +1242,10 @@
}
}
if (!B.DISABLE_EDITOR_EXTENSIONS && !B.DISABLE_EDITOR_BEHAVIOR) {
if (B.ENABLE_EDITOR_EXTENSIONS !== false && (B.ENABLE_EDITOR_BEHAVIOR !== false || B.ENABLE_TABLE_BUILDER)) {
setupTableBuilder(ed);
}
if (B.ENABLE_EDITOR_EXTENSIONS !== false && B.ENABLE_EDITOR_BEHAVIOR !== false) {
setupPlainTextPreserver(ed);
}
setupBlurLogger(ed);
@@ -1277,7 +1279,7 @@
        log('BLOCK REGISTER', 'Registriere Bridge Blöcke, um Preset-Defaults zu überschreiben.', 'purple');
// 🛑 DYNAMISCHE AKTIVIERUNG DER SYNCHRONEN BLÖCKE (Ersetzt die fixen Aufrufe)
if (!B.DISABLE_EDITOR_EXTENSIONS && B.CATEGORY_CONFIG && ed) {
if (B.ENABLE_EDITOR_EXTENSIONS !== false && B.CATEGORY_CONFIG && ed) {
log('DYNAMIC ACTIVATION', 'Starte Aktivierung synchroner Block-Plugins (via Config).', 'purple');
// Iteriere über die konfigurierten Kategorien
@@ -1327,7 +1329,7 @@
}
return false;
};
if (!B.DISABLE_EDITOR_EXTENSIONS && !B.DISABLE_PLACEHOLDERS) {
if (B.ENABLE_EDITOR_EXTENSIONS !== false && B.ENABLE_PLACEHOLDERS !== false) {
if (!ensurePlaceholderRte()) {
const fallbackSrc = B.BASE_PATH_BRIDGE + 'blocks-placeholder.js';
log('PLACEHOLDER LOAD', 'Placeholder-RTE wird geladen.', '#B45309', 'warn');