diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.ts index 2d8109189..085bb1b12 100644 --- a/app/src/protyle/hint/extend.ts +++ b/app/src/protyle/hint/extend.ts @@ -357,6 +357,7 @@ export const hintRef = (key: string, protyle: IProtyle, source: THintSource): IH id: nodeElement ? nodeElement.getAttribute("data-node-id") : protyle.block.parentID, beforeLen: Math.floor((Math.max(protyle.element.clientWidth / 2, 320) - 58) / 28.8), rootID: source === "av" ? "" : protyle.block.rootID, + isDatabase: source === "av", isSquareBrackets: ["[[", "【【"].includes(protyle.hint.splitChar) }, (response) => { const dataList: IHintData[] = []; @@ -403,6 +404,7 @@ export const hintEmbed = (key: string, protyle: IProtyle): IHintData[] => { const nodeElement = hasClosestBlock(getEditorRange(protyle.wysiwyg.element).startContainer); fetchPost("/api/search/searchRefBlock", { k: key, + isDatabase: false, beforeLen: Math.floor((Math.max(protyle.element.clientWidth / 2, 320) - 58) / 28.8), id: nodeElement ? nodeElement.getAttribute("data-node-id") : protyle.block.parentID, rootID: protyle.block.rootID, diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index e7ebffa3c..2edbe514b 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -321,6 +321,7 @@ ${unicode2Emoji(emoji.unicode)}`; id: nodeElement ? nodeElement.getAttribute("data-node-id") : protyle.block.parentID, beforeLen: Math.floor((Math.max(protyle.element.clientWidth / 2, 320) - 58) / 28.8), rootID: source === "av" ? "" : protyle.block.rootID, + isDatabase: source === "av", }, (response) => { let searchHTML = ""; if (response.data.newDoc) {