asdasd
This commit is contained in:
@@ -74,7 +74,12 @@
|
|||||||
const applyContentToComponent = (editor, component, html) => {
|
const applyContentToComponent = (editor, component, html) => {
|
||||||
if (!component) return;
|
if (!component) return;
|
||||||
const content = String(html || '');
|
const content = String(html || '');
|
||||||
if (component.set) component.set('content', content);
|
try {
|
||||||
|
if (component.components) {
|
||||||
|
component.components(content);
|
||||||
|
}
|
||||||
|
if (component.set) component.set('content', content);
|
||||||
|
} catch {}
|
||||||
if (component.view && component.view.el) {
|
if (component.view && component.view.el) {
|
||||||
component.view.el.innerHTML = content;
|
component.view.el.innerHTML = content;
|
||||||
}
|
}
|
||||||
@@ -100,6 +105,16 @@
|
|||||||
if (!modal || editor.__bridgeRteModalOpen) return;
|
if (!modal || editor.__bridgeRteModalOpen) return;
|
||||||
editor.__bridgeRteModalOpen = true;
|
editor.__bridgeRteModalOpen = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const editing = editor.getEditing && editor.getEditing();
|
||||||
|
if (editing && editing.model === component && editor.setEditing) {
|
||||||
|
editor.setEditing(null);
|
||||||
|
}
|
||||||
|
if (editor.RichTextEditor && editor.RichTextEditor.disable && component.view && component.view.el) {
|
||||||
|
editor.RichTextEditor.disable(component.view.el);
|
||||||
|
}
|
||||||
|
} catch {}
|
||||||
|
|
||||||
const closeModal = () => {
|
const closeModal = () => {
|
||||||
editor.__bridgeRteModalOpen = false;
|
editor.__bridgeRteModalOpen = false;
|
||||||
if (typeof modal.close === 'function') {
|
if (typeof modal.close === 'function') {
|
||||||
|
|||||||
Reference in New Issue
Block a user