merge HTMLAttributes

This commit is contained in:
Philipp Kühn
2020-11-14 17:27:59 +01:00
parent 9d7e022ccb
commit 2a321f6739
4 changed files with 41 additions and 28 deletions

View File

@@ -1,9 +1,4 @@
import {
Command,
createMark,
markPasteRule,
mergeAttributes,
} from '@tiptap/core'
import { Command, createMark, markPasteRule } from '@tiptap/core'
import { Plugin, PluginKey } from 'prosemirror-state'
export interface LinkOptions {
@@ -46,7 +41,7 @@ const Link = createMark({
},
renderHTML({ HTMLAttributes }) {
return ['a', mergeAttributes(HTMLAttributes, { rel: this.options.HTMLAttributes.rel }), 0]
return ['a', HTMLAttributes, 0]
},
addCommands() {