Nodes and marks commands

Tiptap provides commands to manipulate nodes and marks easily.

Nodes and marks are the building blocks of your Tiptap editor. Nodes represent content elements like paragraphs, headings, or images, while marks provide inline formatting, such as bold, italic, or links.

Use Cases

List of nodes and marks commands

CommandDescription
clearNodesClears all nodes while adhering to the editor's schema.
createParagraphNearCreates a new paragraph node near the current selection.
deleteNodeDeletes the selected node.
extendMarkRangeExpands the current selection to encompass the specified mark.
exitCodeExits the current code block and continues editing in a new default block.
joinBackwardJoins two nodes backwards from the current selection.
joinForwardJoins two nodes forwards from the current selection.
liftLifts a node up into its parent node.
liftEmptyBlockLifts the currently selected empty textblock.
newlineInCodeInserts a new line in the current code block.
resetAttributesResets specified attributes of a node to its default values.
setMarkAdds a new mark at the current selection.
setNodeReplaces a given range with a specified node.
splitBlockSplits the current node into two nodes at the current selection.
toggleMarkToggles a specific mark on and off at the current selection.
toggleNodeToggles a node with another node.
toggleWrapWraps the current node with a new node or removes a wrapping node.
undoInputRuleUndoes the most recent input rule that was triggered.
unsetAllMarksRemoves all marks from the current selection.
unsetMarkRemoves a specific mark from the current selection.
updateAttributesSets attributes of a node or mark to new values.