This commit is contained in:
Vanessa 2023-02-08 15:26:45 +08:00
parent 6bc95e9f09
commit b002cd46ca

View File

@ -72,13 +72,18 @@ export const loadBreadcrumb = (protyle: IProtyle, element: HTMLElement) => {
tempElement.remove(); tempElement.remove();
} }
element.parentElement.insertAdjacentHTML("afterend", setBacklinkFold(getResponse.data.content, true)); element.parentElement.insertAdjacentHTML("afterend", setBacklinkFold(getResponse.data.content, true));
processRender(protyle.wysiwyg.element); processRender(element.parentElement.parentElement);
highlightRender(protyle.wysiwyg.element); highlightRender(element.parentElement.parentElement);
blockRender(protyle, protyle.wysiwyg.element); blockRender(protyle, element.parentElement.parentElement);
if (getResponse.data.isSyncing) { if (getResponse.data.isSyncing) {
disabledForeverProtyle(protyle); disabledForeverProtyle(protyle);
} else if (window.siyuan.config.readonly || window.siyuan.config.editor.readOnly) { } else if (window.siyuan.config.readonly || window.siyuan.config.editor.readOnly) {
disabledProtyle(protyle); disabledProtyle(protyle);
} else if (element.parentElement.parentElement.classList.contains("protyle-wysiwyg__embed")) {
// 嵌入块
element.parentElement.parentElement.querySelectorAll('[contenteditable="true"][spellcheck]').forEach(item => {
item.setAttribute("contenteditable", "false");
});
} }
}); });
}; };