asdasd
This commit is contained in:
@@ -75,15 +75,19 @@
|
|||||||
const closeModal = () => {
|
const closeModal = () => {
|
||||||
editor.__bridgeRteAllowClose = true;
|
editor.__bridgeRteAllowClose = true;
|
||||||
editor.__bridgeRteModalOpen = false;
|
editor.__bridgeRteModalOpen = false;
|
||||||
|
if (typeof modal.__bridgeOriginalClose === 'function') {
|
||||||
|
modal.__bridgeOriginalClose();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (typeof modal.close === 'function') {
|
if (typeof modal.close === 'function') {
|
||||||
modal.close();
|
modal.close();
|
||||||
} else {
|
return;
|
||||||
const mdl = modal.getModel && modal.getModel();
|
}
|
||||||
if (mdl && typeof mdl.set === 'function') {
|
const mdl = modal.getModel && modal.getModel();
|
||||||
mdl.set('open', false);
|
if (mdl && typeof mdl.set === 'function') {
|
||||||
} else if (modal.el) {
|
mdl.set('open', false);
|
||||||
modal.el.style.display = 'none';
|
} else if (modal.el) {
|
||||||
}
|
modal.el.style.display = 'none';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -324,13 +328,17 @@
|
|||||||
} catch {}
|
} catch {}
|
||||||
const isTextLike = component && component.is && (component.is('text') || component.is('button') || component.is('link'));
|
const isTextLike = component && component.is && (component.is('text') || component.is('button') || component.is('link'));
|
||||||
try {
|
try {
|
||||||
if (!isTextLike && component.components) {
|
if (html) {
|
||||||
component.components(html);
|
if (!isTextLike && component.components) {
|
||||||
}
|
component.components(html);
|
||||||
if (component.set) {
|
}
|
||||||
component.set('content', html);
|
if (component.set) {
|
||||||
component.trigger && component.trigger('change:content');
|
component.set('content', html);
|
||||||
component.trigger && component.trigger('change:components');
|
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) {
|
if (component.view && component.view.render) {
|
||||||
component.view.render();
|
component.view.render();
|
||||||
@@ -339,7 +347,6 @@
|
|||||||
editor.trigger('component:update', component);
|
editor.trigger('component:update', component);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {}
|
||||||
try { editor.__bridgeRteAllowClose = true; } catch {}
|
|
||||||
closeModal();
|
closeModal();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user