diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 44c942771..0bbc76ef8 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -259,14 +259,28 @@ export const fileAnnotationRefMenu = (protyle: IProtyle, refElement: HTMLElement }).element); window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element); window.siyuan.menus.menu.append(new MenuItem({ - label: `${window.siyuan.languages.turnInto} ${window.siyuan.languages.text}`, + label: window.siyuan.languages.turnInto, icon: "iconRefresh", - click() { - nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss")); - removeInlineType(refElement, "file-annotation-ref", protyle.toolbar.range); - updateTransaction(protyle, id, nodeElement.outerHTML, oldHTML); - oldHTML = nodeElement.outerHTML; - } + submenu: [{ + iconHTML: "", + label: window.siyuan.languages.text, + click() { + nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss")); + removeInlineType(refElement, "file-annotation-ref", protyle.toolbar.range); + updateTransaction(protyle, id, nodeElement.outerHTML, oldHTML); + oldHTML = nodeElement.outerHTML; + } + }, { + iconHTML: "", + label: window.siyuan.languages.text + " *", + click() { + refElement.insertAdjacentHTML("beforebegin", refElement.innerHTML + " "); + refElement.textContent = "*"; + nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss")); + updateTransaction(protyle, id, nodeElement.outerHTML, oldHTML); + oldHTML = nodeElement.outerHTML; + } + }] }).element); window.siyuan.menus.menu.append(new MenuItem({ icon: "iconTrashcan",