manually merge HTMLAttributes

This commit is contained in:
Philipp Kühn
2020-11-25 09:50:54 +01:00
parent 7a058b9c2f
commit ddc71f792a
21 changed files with 88 additions and 41 deletions

View File

@@ -3,6 +3,7 @@ import {
Mark,
markInputRule,
markPasteRule,
mergeAttributes,
} from '@tiptap/core'
export interface BoldOptions {
@@ -40,7 +41,7 @@ const Bold = Mark.create({
},
renderHTML({ HTMLAttributes }) {
return ['strong', HTMLAttributes, 0]
return ['strong', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]
},
addCommands() {