Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/14488

Vanessa2728815a1a8f
diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.ts
index 195bc14fd6..cb481aeaea 100644
--- a/app/src/protyle/wysiwyg/transaction.ts
+++ b/app/src/protyle/wysiwyg/transaction.ts
@@ -268,10 +268,10 @@ const updateEmbed = (protyle: IProtyle, operation: IOperation) => {
const updateHTML = (item: Element, html: string) => {
const tempElement = document.createElement("template");
tempElement.innerHTML = html;
- tempElement.querySelectorAll('[contenteditable="true"]').forEach(editItem => {
+ tempElement.content.querySelectorAll('[contenteditable="true"]').forEach(editItem => {
editItem.setAttribute("contenteditable", "false");
});
- tempElement.querySelectorAll(".protyle-wysiwyg--select").forEach(selectItem => {
+ tempElement.content.querySelectorAll(".protyle-wysiwyg--select").forEach(selectItem => {
selectItem.classList.remove("protyle-wysiwyg--select");
})
const wbrElement = tempElement.querySelector("wbr");