Skip to content

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

:bug: Enable tag completion in table cell editors https://github.com/siyuan-note/siyuan/issues/19661

Daniel701dc7bc7d6a
diff --git a/app/src/protyle/render/tableCellRichEditor.ts b/app/src/protyle/render/tableCellRichEditor.ts
index f87494b99b..89ac1cfbd0 100644
--- a/app/src/protyle/render/tableCellRichEditor.ts
+++ b/app/src/protyle/render/tableCellRichEditor.ts
@@ -1,6 +1,6 @@
import {isMobile} from "../../util/functions";
import {showMessage} from "../../dialog/message";
-import {hintRef, hintSlash} from "../hint/extend";
+import {hintRef, hintSlash, hintTag} from "../hint/extend";
import {registerBuiltinSlashHint} from "../hint/builtinSlash";
import {mountProtyleLiteFragment} from "../lite/fragmentEditor";
import {setMobileToolbarUndo} from "../lite/mobileToolbar";
@@ -154,7 +154,7 @@ export const openTableCellRichEditor = (owner: IProtyle, cell: HTMLTableCellElem
hintSlash(key, protyle, hintSource).filter(item => TABLE_CELL_SLASH_IDS.has(item.id)));
const hint: IProtyleOptions["hint"] = {
extend: [{key: "((", hint: hintRef}, {key: "【【", hint: hintRef}, {key: "((", hint: hintRef},
- {key: "[[", hint: hintRef}, {key: "/", hint: safeSlash}, {key: "、", hint: safeSlash}],
+ {key: "[[", hint: hintRef}, {key: "#", hint: hintTag}, {key: "/", hint: safeSlash}, {key: "、", hint: safeSlash}],
};
let finished = false;
let composing = false;