Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/13742

Vanessac7c35b4bf0ce
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index 44c9427711..0bbc76ef88 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} <b>${window.siyuan.languages.text}</b>`,
+ 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",