improve enter behavior for figure

This commit is contained in:
Philipp Kühn
2021-06-01 22:56:24 +02:00
parent 2eb177f7d2
commit b3b297f5ce

View File

@@ -36,6 +36,8 @@ export const Figure = Node.create<FigureOptions>({
draggable: true,
isolating: true,
addAttributes() {
return {
src: {
@@ -77,7 +79,7 @@ export const Figure = Node.create<FigureOptions>({
renderHTML({ HTMLAttributes }) {
return [
'figure', this.options.HTMLAttributes,
['img', mergeAttributes(HTMLAttributes, { draggable: false })],
['img', mergeAttributes(HTMLAttributes, { draggable: false, contenteditable: false })],
['figcaption', 0],
]
},