refactoring

This commit is contained in:
Philipp Kühn
2021-01-19 20:42:15 +01:00
parent 563f37d74b
commit 4256de7cde
3 changed files with 17 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
import { Node } from '@tiptap/core'
import { Node, mergeAttributes } from '@tiptap/core'
import Suggestion, { SuggestionOptions } from '@tiptap/suggestion'
export type MentionOptions = {
@@ -57,7 +57,7 @@ export const Mention = Node.create({
},
renderHTML({ node, HTMLAttributes }) {
return ['span', HTMLAttributes, `@${node.attrs.id}`]
return ['span', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), `@${node.attrs.id}`]
},
renderText({ node }) {