fix figure drag
This commit is contained in:
@@ -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],
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user