From d4b2aac114c36894268e9e00fea7f7cf9737bb26 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Sat, 10 Sep 2022 19:22:57 -0700 Subject: [PATCH] Use % as the prompt; allow for spaces --- web/components/editor/mention-suggestion.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/components/editor/mention-suggestion.ts b/web/components/editor/mention-suggestion.ts index e849385b..bc2b72dd 100644 --- a/web/components/editor/mention-suggestion.ts +++ b/web/components/editor/mention-suggestion.ts @@ -14,6 +14,8 @@ const beginsWith = (text: string, query: string) => // copied from https://tiptap.dev/api/nodes/mention#usage export const mentionSuggestion: Suggestion = { + char: '%', + allowSpaces: true, items: async ({ query }) => orderBy( (await getCachedContracts()).filter((c) =>