tiptap/docs/api/commands/split-block.md
2022-06-08 12:41:14 +02:00

556 B

splitBlock

splitBlock will split the current node into two nodes at the current NodeSelection. If the current selection is not splittable, the command will be ignored.

Parameters

options: Record<string, any>

  • keepMarks: boolean - Defines if the marks should be kept or removed. Defaults to true.

Usage

// split the current node and keep marks
editor.commands.splitBlock()

// split the current node and don't keep marks
editor.commands.splitBlock({ keepMarks: false })