fix figure drag

This commit is contained in:
Philipp Kühn
2021-06-01 17:48:46 +02:00
parent faddc873ad
commit f5febda470

View File

@@ -2,6 +2,7 @@ import {
Command,
Node,
nodeInputRule,
mergeAttributes,
} from '@tiptap/core'
export interface FigureOptions {
@@ -76,7 +77,7 @@ export const Figure = Node.create<FigureOptions>({
renderHTML({ HTMLAttributes }) {
return [
'figure', this.options.HTMLAttributes,
['img', HTMLAttributes],
['img', mergeAttributes(HTMLAttributes, { draggable: false })],
['figcaption', 0],
]
},