From 7703565c7580e42fda7774277f07005a6ed7f47a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Tue, 12 Mar 2024 21:47:05 +0100 Subject: [PATCH] fix(ui): hashtags not working when composing (#2686) --- composables/tiptap.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composables/tiptap.ts b/composables/tiptap.ts index ba577a32..b50e3829 100644 --- a/composables/tiptap.ts +++ b/composables/tiptap.ts @@ -63,6 +63,9 @@ export function useTiptap(options: UseTiptapOptions) { Mention .extend({ name: 'hashtag' }) .configure({ + renderHTML({ options, node }) { + return ['span', { 'data-type': 'hashtag', 'data-id': node.attrs.id }, `${options.suggestion.char}${node.attrs.label ?? node.attrs.id}`] + }, suggestion: TiptapHashtagSuggestion, }), Mention