mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 20:11:53 +08:00
This commit is contained in:
parent
d86698663a
commit
359d628d82
@ -266,8 +266,19 @@ export const duplicateBlock = (nodeElements: Element[], protyle: IProtyle) => {
|
|||||||
}
|
}
|
||||||
const newId = Lute.NewNodeID();
|
const newId = Lute.NewNodeID();
|
||||||
tempElement.setAttribute("data-node-id", newId);
|
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 => {
|
tempElement.querySelectorAll("[data-node-id]").forEach(childItem => {
|
||||||
childItem.setAttribute("data-node-id", Lute.NewNodeID());
|
childItem.setAttribute("data-node-id", newId);
|
||||||
|
childItem.removeAttribute(Constants.CUSTOM_RIFF_DECKS);
|
||||||
|
childItem.classList.remove("protyle-wysiwyg--select", "protyle-wysiwyg--hl");
|
||||||
|
childItem.setAttribute("updated", newId.split("-")[0]);
|
||||||
|
childItem.removeAttribute("refcount");
|
||||||
|
childItem.lastElementChild.querySelector(".protyle-attr--refcount")?.remove();
|
||||||
});
|
});
|
||||||
item.classList.remove("protyle-wysiwyg--select");
|
item.classList.remove("protyle-wysiwyg--select");
|
||||||
if (typeof starIndex === "number") {
|
if (typeof starIndex === "number") {
|
||||||
|
Loading…
Reference in New Issue
Block a user