mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 23:15:15 +08:00
fix orderedList truncated after the codeBlock is deleted in the orderedList
This commit is contained in:
parent
2a83166a46
commit
36a66600c0
@ -138,6 +138,12 @@ export const CodeBlock = Node.create<CodeBlockOptions>({
|
||||
}
|
||||
|
||||
if (isAtStart || !$anchor.parent.textContent.length) {
|
||||
if (this.editor.isActive('orderedList'))
|
||||
return this.editor
|
||||
.chain()
|
||||
.insertContent('<p></p>')
|
||||
.deleteNode(this.name)
|
||||
.run()
|
||||
return this.editor.commands.clearNodes()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user