Fix @/% suggestion regression

See https://github.com/ueberdosis/tiptap/pull/3239
This commit is contained in:
Austin Chen 2022-10-13 19:05:56 -07:00
parent abd06f272b
commit 3a63503161
2 changed files with 2 additions and 0 deletions

View File

@ -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(

View File

@ -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) =>