fix: use setNode instead of toggleNode for setParagraph command

This commit is contained in:
Philipp Kühn
2021-08-10 16:59:09 +02:00
parent ffd241b2d8
commit bcc1309cd9

View File

@@ -41,7 +41,7 @@ export const Paragraph = Node.create<ParagraphOptions>({
addCommands() { addCommands() {
return { return {
setParagraph: () => ({ commands }) => { setParagraph: () => ({ commands }) => {
return commands.toggleNode('paragraph', 'paragraph') return commands.setNode('paragraph')
}, },
} }
}, },