mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
This commit is contained in:
parent
a4da241168
commit
6f39028d24
1 changed files with 24 additions and 0 deletions
|
|
@ -237,6 +237,30 @@ const moveTo = async (protyle: IProtyle, sourceElements: Element[], targetElemen
|
||||||
tempTargetElement = newListElement;
|
tempTargetElement = newListElement;
|
||||||
}
|
}
|
||||||
newListId = null;
|
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") {
|
} else if (position === "beforebegin") {
|
||||||
tempTargetElement = isCopy ? copyElement : item;
|
tempTargetElement = isCopy ? copyElement : item;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue