---
title: "clearContent command"
description: "Delete all content in the editor with the clearContent command in your Tiptap Editor. Learn more in the docs."
---

> This page is for Tiptap 2.x. [See the latest version of this page.](https://tiptap.dev/docs/editor/api/commands/content/clear-content.md)

# clearContent command

Delete all content in the editor with the clearContent command in your Tiptap Editor. Learn more in the docs.

The `clearContent` command deletes the current document.

Keep in mind that the editor will enforce the configured schema, and the document won’t be `null`. The default [`Document`](https://tiptap.dev/docs/v2/editor/extensions/nodes/document.md) expects to have at least one block node, which is the paragraph by default. In other words: Even after running that command the document will have at least one (empty) paragraph.

See also: [setContent](https://tiptap.dev/docs/v2/editor/api/commands/content/set-content.md), [insertContent](https://tiptap.dev/docs/v2/editor/api/commands/content/insert-content.md)

## Parameters

`emitUpdate: boolean (false)`

By default, it doesn’t trigger the update event. Passing `true` doesn’t prevent triggering the update event.

## Use the clearContent command

```js
// Remove all content from the document
editor.commands.clearContent()

// Remove all content, and trigger the `update` event
editor.commands.clearContent(true)
```
