This commit is contained in:
2026-01-14 01:50:50 +01:00
parent 62da2a67af
commit d49c326c90
9 changed files with 343 additions and 37 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -86,6 +86,11 @@ function defaultSetup() {
password_key: '',
charset_key: '',
},
fonts: {
dir: '',
url_base: '',
urls: '',
},
};
}
@@ -148,6 +153,19 @@ function fillForm(setup, options = {}) {
if (input) input.value = value;
});
}
const fontFields = document.getElementById('bridgeFontsForm');
if (fontFields) {
const fontMap = {
fonts_dir: data.fonts.dir || '',
fonts_url_base: data.fonts.url_base || '',
fonts_urls: data.fonts.urls || '',
};
Object.entries(fontMap).forEach(([name, value]) => {
const input = fontFields.querySelector(`[name="${name}"]`);
if (input) input.value = value;
});
}
}
function applyModeVisibility(mode) {
@@ -224,6 +242,9 @@ async function submitBridgeSetup(ev) {
config_user_key: form.config_user_key?.value.trim() || '',
config_password_key: form.config_password_key?.value.trim() || '',
config_charset_key: form.config_charset_key?.value.trim() || '',
fonts_dir: document.querySelector('[name="fonts_dir"]')?.value.trim() || '',
fonts_url_base: document.querySelector('[name="fonts_url_base"]')?.value.trim() || '',
fonts_urls: document.querySelector('[name="fonts_urls"]')?.value || '',
};
try {
@@ -324,5 +345,9 @@ function normalizeSetupInput(input) {
direct.port = Number(direct.port || 3306) || 3306;
direct.charset = direct.charset || 'utf8mb4';
const config = { ...base.config, ...(input.config || {}) };
return { tables, mode: validMode, direct, config };
const fonts = { ...base.fonts, ...(input.fonts || {}) };
fonts.dir = String(fonts.dir || '').trim();
fonts.url_base = String(fonts.url_base || '').trim();
fonts.urls = String(fonts.urls || '');
return { tables, mode: validMode, direct, config, fonts };
}

View File

@@ -464,7 +464,11 @@
}
// 1. Daten extrahieren
const htmlContent = editor.getHtml() + '<style>' + editor.getCss() + '</style>';
const fontCss = (B && typeof B.RTE_FONT_FACE_CSS === 'string' && B.RTE_FONT_FACE_CSS.trim())
? B.RTE_FONT_FACE_CSS.trim()
: '';
const cssPayload = (fontCss ? fontCss + '\n' : '') + editor.getCss();
const htmlContent = editor.getHtml() + '<style>' + cssPayload + '</style>';
// 2. KRITISCH: Holt die JSON-Repräsentation des Editors
let jsonProjectDataRaw = '';
try {