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