Skip to content

Commit

Permalink
fix(ui): hashtags not working when composing (#2686)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Mar 12, 2024
1 parent 5a9546e commit 7703565
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions composables/tiptap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7703565

Please sign in to comment.