Unlike many other editors, Tiptap is based on a schema that defines how your content is structured.
The schema describes the kind of nodes that may occur in the document, and the way they are nested.
// the underlying ProseMirror schema
{
nodes: {
doc: {
content: 'block+',
},
paragraph: {
content: 'inline*',
group: 'block',
parseDOM: [{ tag: 'p' }],
toDOM: () => ['p', 0],
},
text: {
group: 'inline',
},
},
}
If you think of the document as a tree, then nodes are just a type of content in that tree.
Blockquote
BulletList
CodeBlock
Document
HardBreak
Heading
Text
Paragraph
…
Marks can be applied to specific parts of a node.
Bold
Code
Italic
Strike
TextStyle
…