Custom Nodes
Nodes are the building blocks for block-level content in Tiptap. They represent things like paragraphs, headings, blockquotes, code blocks, and more. Each node can have attributes, content rules, and custom rendering.Understanding Nodes
The Node class extends the Extendable class and provides specific functionality for block-level content.packages/core/src/Node.ts:340
Creating a Simple Node
Let’s start with a simple paragraph node.packages/extension-paragraph/src/paragraph.ts:41
Node with Attributes
Here’s a heading node that demonstrates attributes.packages/extension-heading/src/heading.ts:47
Wrapping Nodes
Some nodes wrap other content, like blockquotes.packages/extension-blockquote/src/blockquote.tsx:41
Content Expressions
Content expressions define what content a node can contain.packages/core/src/Node.ts:32
Node Groups
Groups allow you to reference multiple node types in content expressions.packages/core/src/Node.ts:72
Node Attributes
Attributes store data on nodes and control rendering.packages/core/src/Node.ts:323
Node Properties
Nodes have several important properties that control their behavior.packages/core/src/Node.ts:25
Input Rules
Input rules allow you to trigger node creation from text patterns.TypeScript Commands
Add type-safe commands to your node.packages/extension-heading/src/heading.ts:24
Extending Nodes
You can extend existing nodes to customize behavior.packages/core/src/Node.ts:357
Next Steps
Custom Marks
Create custom inline formatting
Custom Extensions
Add editor-wide functionality