---
title: "cut command"
description: "Use the cut command in Tiptap to cut out content from a range and place it at a given position. Learn more in our docs!"
canonical_url: "https://tiptap.dev/docs/editor/api/commands/content/cut"
---

# cut command

Use the cut command in Tiptap to cut out content from a range and place it at a given position. Learn more in our docs!

This command cuts out content and places it into the given position.

See also: [focus](https://tiptap.dev/docs/editor/api/commands/selection/focus.md)

## Use the cut command

```js
const from = editor.state.selection.from
const to = editor.state.selection.to

const endPos = editor.state.doc.nodeSize - 2

// Cut out content from range and put it at the end of the document
editor.commands.cut({ from, to }, endPos)
```
