---
title: "Document extension"
description: "Use the required Document extension as a home for all your editor’s nodes and content. Learn more in our docs!"
canonical_url: "https://tiptap.dev/docs/editor/extensions/nodes/document"
---

# Document extension

Use the required Document extension as a home for all your editor’s nodes and content. Learn more in our docs!

The `Document` extension is required, no matter what you build with Tiptap. It’s a so called “topNode”, a node that’s the home to all other nodes. Think of it like the `<body>` tag for your document.

The node is very tiny though. It defines a name of the node (`doc`), is configured to be a top node (`topNode: true`) and that it can contain multiple other nodes (`block+`). That’s all. But have a look yourself:

> **Interactive demo:** [Document](https://embed.tiptap.dev/preview/Nodes/Document)

> **Breaking Change:**
>
> Tiptap v1 tried to hide that node from you, but it has always been there. You have to explicitly
> import it from now on (or use [StarterKit](https://tiptap.dev/docs/editor/extensions/functionality/starterkit.md)).

## Install

```bash
npm install @tiptap/extension-document
```

## Source code

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