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