mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 23:38:49 +01:00
This commit is contained in:
parent
967dc29741
commit
d275f20a4d
1 changed files with 3 additions and 3 deletions
|
|
@ -266,17 +266,17 @@ export const duplicateBlock = (nodeElements: Element[], protyle: IProtyle) => {
|
|||
}
|
||||
const newId = Lute.NewNodeID();
|
||||
tempElement.setAttribute("data-node-id", newId);
|
||||
tempElement.setAttribute("data-node-id", newId);
|
||||
tempElement.removeAttribute(Constants.CUSTOM_RIFF_DECKS);
|
||||
tempElement.classList.remove("protyle-wysiwyg--select", "protyle-wysiwyg--hl");
|
||||
tempElement.setAttribute("updated", newId.split("-")[0]);
|
||||
tempElement.removeAttribute("refcount");
|
||||
tempElement.lastElementChild.querySelector(".protyle-attr--refcount")?.remove();
|
||||
tempElement.querySelectorAll("[data-node-id]").forEach(childItem => {
|
||||
childItem.setAttribute("data-node-id", newId);
|
||||
const subNewId = Lute.NewNodeID();
|
||||
childItem.setAttribute("data-node-id", subNewId);
|
||||
childItem.removeAttribute(Constants.CUSTOM_RIFF_DECKS);
|
||||
childItem.classList.remove("protyle-wysiwyg--select", "protyle-wysiwyg--hl");
|
||||
childItem.setAttribute("updated", newId.split("-")[0]);
|
||||
childItem.setAttribute("updated", subNewId.split("-")[0]);
|
||||
childItem.removeAttribute("refcount");
|
||||
childItem.lastElementChild.querySelector(".protyle-attr--refcount")?.remove();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue