Skip to content

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

:bug: https://github.com/siyuan-note/siyuan/issues/16315 2

Vanessa6f39028d24b4
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.ts
index 5db2200fa1..3ce216b7d2 100644
--- a/app/src/protyle/util/editorCommonEvent.ts
+++ b/app/src/protyle/util/editorCommonEvent.ts
@@ -237,6 +237,30 @@ const moveTo = async (protyle: IProtyle, sourceElements: Element[], targetElemen
tempTargetElement = newListElement;
}
newListId = null;
+ if (newListElement.getAttribute("data-subtype") === "o" && newListElement.firstElementChild.getAttribute("data-marker") !== "1.") {
+ Array.from(newListElement.children).forEach((listItem) => {
+ if (listItem.classList.contains("protyle-attr")) {
+ return;
+ }
+ undoOperations.push({
+ action: "update",
+ id: listItem.getAttribute("data-node-id"),
+ data: listItem.outerHTML
+ });
+ });
+ updateListOrder(newListElement, 1);
+ Array.from(newListElement.children).forEach((listItem) => {
+ if (listItem.classList.contains("protyle-attr")) {
+ return;
+ }
+ doOperations.push({
+ action: "update",
+ id: listItem.getAttribute("data-node-id"),
+ data: listItem.outerHTML
+ });
+ });
+ updateListOrder(newListElement, 1);
+ }
} else if (position === "beforebegin") {
tempTargetElement = isCopy ? copyElement : item;
}