ohne blur
This commit is contained in:
@@ -1 +1 @@
|
||||
1.2.55
|
||||
1.2.56
|
||||
@@ -584,6 +584,28 @@
|
||||
} catch {}
|
||||
|
||||
// 1. Daten extrahieren
|
||||
// Force-Sync: alle Text-Components aus der View ins Model schreiben,
|
||||
// damit Save ohne Blur nicht den letzten UI-Stand verliert.
|
||||
try {
|
||||
const wrapper = editor.getWrapper && editor.getWrapper();
|
||||
if (wrapper && wrapper.find) {
|
||||
const texts = wrapper.find('[data-gjs-type="text"]') || [];
|
||||
texts.forEach((comp) => {
|
||||
if (!comp || !comp.set) return;
|
||||
const type = comp.get ? comp.get('type') : null;
|
||||
if (type && type !== 'text' && type !== 'textnode') return;
|
||||
const el = comp.view && comp.view.el;
|
||||
if (!el) return;
|
||||
const html = el.innerHTML || '';
|
||||
const before = typeof comp.get === 'function' ? (comp.get('content') || '') : '';
|
||||
if (html !== before) {
|
||||
comp.set('content', html);
|
||||
comp.trigger && comp.trigger('change:content');
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch {}
|
||||
|
||||
const fontCss = (B && typeof B.RTE_FONT_FACE_CSS === 'string' && B.RTE_FONT_FACE_CSS.trim())
|
||||
? B.RTE_FONT_FACE_CSS.trim()
|
||||
: '';
|
||||
@@ -701,7 +723,7 @@
|
||||
log('SAVE SUCCESS', `Speichern erfolgreich für Aktion ${action}.`, '#008000', 'info');
|
||||
// 💡 HINZUGEFÜGT: Bestätigung an das Elternfenster senden
|
||||
window.parent.postMessage({ source: 'editor', type: 'save:success' }, '*');
|
||||
editor.refresh(); // Optional: Editor-Ansicht aktualisieren
|
||||
// Kein refresh, um UI-Text nicht zu verlieren falls noch nicht gesynct
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
Reference in New Issue
Block a user