asdasd
This commit is contained in:
@@ -75,16 +75,20 @@
|
||||
const closeModal = () => {
|
||||
editor.__bridgeRteAllowClose = true;
|
||||
editor.__bridgeRteModalOpen = false;
|
||||
if (typeof modal.__bridgeOriginalClose === 'function') {
|
||||
modal.__bridgeOriginalClose();
|
||||
return;
|
||||
}
|
||||
if (typeof modal.close === 'function') {
|
||||
modal.close();
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
const mdl = modal.getModel && modal.getModel();
|
||||
if (mdl && typeof mdl.set === 'function') {
|
||||
mdl.set('open', false);
|
||||
} else if (modal.el) {
|
||||
modal.el.style.display = 'none';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (!modal.__bridgeCloseLocked) {
|
||||
@@ -324,6 +328,7 @@
|
||||
} catch {}
|
||||
const isTextLike = component && component.is && (component.is('text') || component.is('button') || component.is('link'));
|
||||
try {
|
||||
if (html) {
|
||||
if (!isTextLike && component.components) {
|
||||
component.components(html);
|
||||
}
|
||||
@@ -332,6 +337,9 @@
|
||||
component.trigger && component.trigger('change:content');
|
||||
component.trigger && component.trigger('change:components');
|
||||
}
|
||||
} else {
|
||||
console.warn('[RTE SAVE DEBUG] Skip empty content update.');
|
||||
}
|
||||
if (component.view && component.view.render) {
|
||||
component.view.render();
|
||||
}
|
||||
@@ -339,7 +347,6 @@
|
||||
editor.trigger('component:update', component);
|
||||
}
|
||||
} catch {}
|
||||
try { editor.__bridgeRteAllowClose = true; } catch {}
|
||||
closeModal();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user