Styling the Editor
Tiptap is designed to be unstyled by default, giving you complete control over the appearance of your editor. However, it does include some minimal base styles to ensure proper functionality.Base Styles
Tiptap automatically injects minimal CSS styles required for the editor to function properly. These styles are injected by default but can be disabled.packages/core/src/style.ts:1
Disabling CSS Injection
You can disable automatic CSS injection and provide your own styles.packages/core/src/Editor.ts:88
Editor Container Styling
Style the editor container to customize its appearance.demos/src/Examples/Default/React/styles.scss:55
Content Styling
Style the content inside the editor.Placeholder Styling
Style placeholder text for empty content.Selection Styling
Customize text selection appearance.Gap Cursor Styling
The gap cursor appears between block nodes.packages/core/src/style.ts:34
Dark Mode
Implement dark mode for your editor.CSS Variables
Use CSS variables for consistent theming.demos/src/Examples/Default/React/styles.scss:1
Typography with Tailwind
Use Tailwind’s typography plugin for beautiful defaults.Custom Node Styling
Add custom classes to specific node types.Responsive Design
Make your editor responsive.Print Styles
Optimize editor content for printing.Scrollbar Styling
Customize scrollbar appearance.demos/preview/style.css:101
Remember that Tiptap is headless, so you have complete control over styling. The examples above are just starting points.
Next Steps
TypeScript
Add type safety to your editor
Collaborative Editing
Enable real-time collaboration