mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-21 07:18:05 +08:00
1.3 KiB
1.3 KiB
description | icon |
---|---|
Everyone needs it, nobody talks about it: the Document extension. | file-line |
Document
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:
:::warning Breaking Change from 1.x → 2.x
Tiptap 1 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
).
:::
Installation
npm install @tiptap/extension-document