rename toggleNode to toggleBlockType
This commit is contained in:
@@ -24,7 +24,7 @@ editor.chain().focus().bold().run()
|
||||
| .replaceWithNode() | Replace a given range with a node. |
|
||||
| .selectParentNode() | Select the parent node. |
|
||||
| .toggleMark() | Toggle a mark on and off. |
|
||||
| .toggleNode() | Toggle a node with another node. |
|
||||
| .toggleBlockType() | Toggle a node with another node. |
|
||||
| .updateMark() | Update a mark with new attributes. |
|
||||
|
||||
### Selection
|
||||
|
||||
@@ -47,7 +47,7 @@ import Paragraph from '@tiptap/extension-paragraph'
|
||||
const CustomParagraph = Paragraph()
|
||||
.commands(() => ({
|
||||
paragraph: () => ({ commands }) => {
|
||||
return commands.toggleNode(name, 'paragraph')
|
||||
return commands.toggleBlockType(name, 'paragraph')
|
||||
},
|
||||
}))
|
||||
.create()
|
||||
|
||||
Reference in New Issue
Block a user