refactoring

This commit is contained in:
Philipp Kühn
2021-01-19 20:42:15 +01:00
committed by Hans Pagel
parent 8a59f484d0
commit 397df8c673
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 }) {