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