> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/ueberdosis/tiptap/llms.txt
> Use this file to discover all available pages before exploring further.

# Document

> The default top-level document node that represents the root of the editor content.

The Document extension provides the root node of your editor. Every Tiptap editor requires a document node as the top-level container for all other content.

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @tiptap/extension-document
  ```

  ```bash yarn theme={null}
  yarn add @tiptap/extension-document
  ```

  ```bash pnpm theme={null}
  pnpm add @tiptap/extension-document
  ```
</CodeGroup>

## Usage

The Document extension is included in the StarterKit by default. If you're building a custom editor, you'll need to register it:

```typescript theme={null}
import { Editor } from '@tiptap/core'
import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'

const editor = new Editor({
  extensions: [
    Document,
    Paragraph,
    Text,
  ],
})
```

## Configuration

The Document extension has no configuration options. It serves as the root container and requires at least one block-level node as content.

## Schema

The Document node has the following properties:

* **Name**: `doc`
* **Content**: `block+` (one or more block-level nodes)
* **Top Node**: `true` (this is the root node)

## Source Code

View the source code on GitHub:

[packages/extension-document/src/document.ts](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-document/src/document.ts)
