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/14921

Vanessa1116f466bbb7
diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json
index 65e4d166ad..de8c9ed85f 100644
--- a/app/appearance/langs/zh_CN.json
+++ b/app/appearance/langs/zh_CN.json
@@ -450,6 +450,7 @@
"workspaceList": "工作空间",
"removeWorkspaceTip": "从工作空间列表中移除",
"new": "新建",
+ "newTag": "新建标签",
"share2LiandiConfirmTip": "确定将该文档<b>公开</b>分享到<a href=\"${accountServer}\" target=\"_blank\">社区</a>吗?<br>公开分享后所有人都可以查看该文档,请确保文档内容不包含敏感信息",
"share2Liandi": "分享到社区",
"noDueCard": "干得漂亮!目前已经没有更多复习任务,过一会再来看看吧!",
diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts
index 04ba76b099..6f07cce206 100644
--- a/app/src/protyle/hint/extend.ts
+++ b/app/src/protyle/hint/extend.ts
@@ -381,7 +381,7 @@ export const hintTag = (key: string, protyle: IProtyle): IHintData[] => {
if (response.data.k && !hasKey) {
dataList.splice(0, 0, {
value: `<span data-type="tag">${response.data.k}</span>`,
- html: `<div class="b3-list-item__text">${window.siyuan.languages.new} <mark>${escapeHtml(response.data.k)}</mark></div>`,
+ html: `<div class="b3-list-item__text">${window.siyuan.languages.newTag} <mark>${escapeHtml(response.data.k)}</mark></div>`,
});
if (dataList.length > 1) {
dataList[1].focus = true;
diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts
index 90b9d26c52..370c10b402 100644
--- a/app/src/protyle/util/paste.ts
+++ b/app/src/protyle/util/paste.ts
@@ -252,7 +252,6 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
}) & {
target: HTMLElement
}) => {
- protyle.hint.enableExtend = false;
if ("clipboardData" in event || "dataTransfer" in event) {
event.stopPropagation();
event.preventDefault();
@@ -370,7 +369,8 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
}
return;
}
- hideElements(["select", "hint"], protyle);
+ protyle.hint.enableExtend = Constants.BLOCK_HINT_KEYS.includes(protyle.hint.splitChar);
+ hideElements(protyle.hint.enableExtend ? ["select"] : ["select", "hint"], protyle);
protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--hl").forEach(item => {
item.classList.remove("protyle-wysiwyg--hl");
});