From 48a8b74e7c72c6cf5b5f759f4aabf334e432cf99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Wed, 6 Mar 2024 16:42:41 +0100 Subject: [PATCH] fix(ui): mentions not working when composing (#2655) --- composables/tiptap.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composables/tiptap.ts b/composables/tiptap.ts index 598dff5f..ba577a32 100644 --- a/composables/tiptap.ts +++ b/composables/tiptap.ts @@ -55,6 +55,9 @@ export function useTiptap(options: UseTiptapOptions) { }, }), Mention.configure({ + renderHTML({ options, node }) { + return ['span', { 'data-type': 'mention', 'data-id': node.attrs.id }, `${options.suggestion.char}${node.attrs.label ?? node.attrs.id}`] + }, suggestion: TiptapMentionSuggestion, }), Mention