This commit is contained in:
Vanessa 2022-09-14 23:26:02 +08:00
parent fc932b0065
commit 7e164623cb
14 changed files with 48 additions and 42 deletions

View file

@ -794,7 +794,10 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
icon: "iconGraph",
click() {
linkElement.setAttribute("data-subtype", "s");
linkElement.setAttribute("data-type", "block-ref");
const types = linkElement.getAttribute("data-type").split(" ");
types.push("block-ref");
types.splice(types.indexOf("a"), 1);
linkElement.setAttribute("data-type", types.join(" "));
linkElement.setAttribute("data-id", linkAddress?.replace("siyuan://blocks/", ""));
linkElement.removeAttribute("data-href");
linkElement.removeAttribute("data-title");