deleteSelection command

The deleteSelection command in Tiptap targets and removes any nodes or content that are currently selected within the editor.

The deleteSelection command deletes the currently selected nodes. If no selection exists, nothing will be deleted.

Use the deleteSelection command

editor.commands.deleteSelection()