diff --git a/web/components/editor/contract-mention-suggestion.ts b/web/components/editor/contract-mention-suggestion.ts index 39d024e7..38262946 100644 --- a/web/components/editor/contract-mention-suggestion.ts +++ b/web/components/editor/contract-mention-suggestion.ts @@ -14,6 +14,7 @@ const beginsWith = (text: string, query: string) => export const contractMentionSuggestion: Suggestion = { char: '%', allowSpaces: true, + allowedPrefixes: [' '], pluginKey: new PluginKey('contract-mention'), items: async ({ query }) => orderBy( diff --git a/web/components/editor/mention-suggestion.ts b/web/components/editor/mention-suggestion.ts index b4eeeebe..7e21e0f7 100644 --- a/web/components/editor/mention-suggestion.ts +++ b/web/components/editor/mention-suggestion.ts @@ -14,6 +14,7 @@ const beginsWith = (text: string, query: string) => // copied from https://tiptap.dev/api/nodes/mention#usage export const mentionSuggestion: Suggestion = { + allowedPrefixes: [' '], items: async ({ query }) => orderBy( (await getCachedUsers()).filter((u) =>