Config enabledisable
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -49,9 +49,10 @@ if ($fontSources) {
|
||||
window.__editorMode = "<?=htmlspecialchars($mode, ENT_QUOTES)?>";
|
||||
window.__editorId = <?= $id ?>;
|
||||
window.BridgeParts = window.BridgeParts || {};
|
||||
window.BridgeParts.DISABLE_EDITOR_EXTENSIONS = false;
|
||||
window.BridgeParts.DISABLE_EDITOR_BEHAVIOR = true;
|
||||
window.BridgeParts.DISABLE_PLACEHOLDERS = false;
|
||||
window.BridgeParts.ENABLE_EDITOR_EXTENSIONS = true;
|
||||
window.BridgeParts.ENABLE_EDITOR_BEHAVIOR = false;
|
||||
window.BridgeParts.ENABLE_PLACEHOLDERS = true;
|
||||
window.BridgeParts.ENABLE_TABLE_BUILDER = true;
|
||||
window.BridgeParts.LOG_CONFIG = window.BridgeParts.LOG_CONFIG || {};
|
||||
window.BridgeParts.LOG_CONFIG.INFO_ENABLED = false;
|
||||
window.BridgeParts.LOG_CONFIG.DATA_ENABLED = false;
|
||||
|
||||
Reference in New Issue
Block a user