Skip to content

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

:art: 没有选中文本粘贴链接不应选中整个链接

Vanessa2aeaecf78c2e
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index d3fc8c3b93..69872b1fae 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -546,7 +546,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
if (linkElement) {
protyle.toolbar.setInlineMark(protyle, "a", "range", {
type: "a",
- color: `${linkElement.getAttribute("href")}${Constants.ZWSP}${range.toString() || linkElement.textContent}`
+ color: `${linkElement.getAttribute("href")}${Constants.ZWSP}${range.toString()}`
});
return;
}