fix: error when parsing figure tag without figcaption (#147)
This commit is contained in:
parent
506b36af7f
commit
844f65dd9d
|
@ -67,7 +67,8 @@ export const Figure = Node.create<FigureOptions>({
|
|||
return [
|
||||
{
|
||||
tag: 'figure',
|
||||
contentElement: 'figcaption'
|
||||
contentElement: (dom: HTMLElement) =>
|
||||
dom.querySelector('figcaption') ?? document.createElement('figcaption')
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user