Skip to content

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

:bug: 链接菜单中移除锚文本后无法撤销

Vanessa658c37646d5c
diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts
index 49aacee882..493c294a92 100644
--- a/app/src/menus/protyle.ts
+++ b/app/src/menus/protyle.ts
@@ -627,8 +627,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
inputElement.value = linkElement.textContent.replace(Constants.ZWSP, "");
inputElement.addEventListener("change", () => {
if (!inputElement.value) {
- protyle.toolbar.setInlineMark(protyle, "link", "remove");
- window.siyuan.menus.menu.remove();
+ linkElement.remove();
}
updateTransaction(protyle, id, nodeElement.outerHTML, html);
html = nodeElement.outerHTML;