What is Yoopta Editor?
Yoopta Editor is a free, open-source, headless rich-text editor built for React applications. It’s designed to give you complete control over the editor’s behavior and appearance, allowing you to build editors as powerful and user-friendly as Notion, Craft, Coda, Medium, and more. Unlike traditional editors, Yoopta Editor separates concerns into three distinct layers:- Core Engine (
@yoopta/editor) - Headless editor logic - UI Components (
@yoopta/ui) - Reusable UI components for editor tools - Themes (
@yoopta/themes-*) - Pre-styled element components
Architecture Overview
Headless Core
Yoopta Editor is headless by design. The core package (@yoopta/editor) provides all the logic for managing content, blocks, elements, and operations, but doesn’t render any UI. This means:
- You have complete control over the visual appearance
- You can build custom UI components that fit your design system
- The editor logic is framework-agnostic (though currently React-only)
UI Components Package
The@yoopta/ui package provides ready-to-use React components for common editor features:
- Toolbar - Text formatting toolbar
- ActionMenuList - Block insertion menu (slash command menu)
- SlashCommandMenu - Inline command menu
- BlockOptions - Block-level action menu
- FloatingBlockActions - Floating action buttons
- HighlightColorPicker - Color picker for text highlighting
- Portal & Overlay - Utility components for rendering outside DOM
Themes
Themes provide pre-styled element components that make it easy to get started:@yoopta/themes-shadcn- Shadcn UI styled components (production ready)@yoopta/themes-material- Material Design styled components (in development)
applyTheme() to automatically apply styled components to your plugins.
Package Structure
Yoopta Editor is organized into several package categories:Core Packages
@yoopta/editor
The core headless editor package. Contains all the logic for:
- Block management
- Element tree structures
- Slate.js integration (one Slate editor per block)
- Content operations (insert, delete, update, etc.)
- History/undo-redo
- Parsers (HTML, Markdown, Email, Plain Text)
@yoopta/ui
Reusable UI components for editor tools. These are unstyled and can be customized.
Installation:
Toolbar- Text formatting toolbarActionMenuList- Block insertion menuSlashCommandMenu- Inline slash command menuBlockOptions- Block action menuFloatingBlockActions- Floating action buttonsHighlightColorPicker- Color picker componentPortal&Overlay- Utility components
Plugin Packages
Plugins define block types and their behavior. Each plugin represents a type of content block.Text Plugins
@yoopta/paragraph- Basic paragraph block@yoopta/headings- Heading blocks (H1, H2, H3)@yoopta/blockquote- Blockquote block
List Plugins
@yoopta/lists- Bulleted lists, numbered lists, todo lists
Media Plugins
@yoopta/image- Image block with upload support@yoopta/video- Video embed block@yoopta/file- File attachment block@yoopta/embed- Generic embed block (YouTube, Twitter, etc.)
Layout Plugins
@yoopta/table- Table block with cell editing@yoopta/accordion- Collapsible accordion block@yoopta/divider- Horizontal divider@yoopta/callout- Callout/alert block@yoopta/tabs- Tabs block@yoopta/steps- Step-by-step guide block@yoopta/carousel- Image carousel block
Code Plugin
@yoopta/code- Code block with syntax highlighting
Link Plugin
@yoopta/link- Inline link element
UI Components Package
The@yoopta/ui package provides all UI components for editor interactions. No separate tool packages needed.
Installation:
Toolbar- Text formatting toolbarActionMenuList- Block insertion menu (slash command menu)SlashCommandMenu- Inline slash command menuBlockOptions- Block-level action menuFloatingBlockActions- Floating action buttonsHighlightColorPicker- Color picker for text highlightingPortal&Overlay- Utility components for rendering outside DOM
Marks Package
Marks provide text formatting capabilities:Bold,Italic,Underline,StrikeCode- Inline code formattingHighlight- Text highlighting with colors and gradients
Theme Packages
@yoopta/themes-shadcn
Pre-styled components using Shadcn UI design system. Production ready.
@yoopta/themes-material
Material Design styled components (in development, coming soon).
Utility Packages
@yoopta/exports
Export editor content to various formats:
- Markdown
- HTML
- Plain Text
- Email (HTML email format)
Core Concepts
Slate Per Block
Yoopta Editor uses a unique architecture where each block has its own Slate.js editor instance. This means:- Each block is an independent Slate editor
- Blocks don’t share selection state
- Operations on one block don’t affect others
- Better performance for large documents
Block Structure
A block in Yoopta Editor consists of:- Block Data - Metadata and content
- Slate Value - The Slate.js document structure
- Element Tree - Hierarchical structure of elements
Element Tree
Each block contains a tree of elements. Elements can be:- Root Elements - Top-level element in a block
- Container Elements - Elements that contain other elements
- Leaf Elements - Elements that contain only text nodes
Editor Value Structure
The editor value (YooptaContentValue) is a record (object) where keys are block IDs and values are block data:
injectElementsFromPlugins
TheinjectElementsFromPlugins property allows elements from one plugin to be inserted inside elements of another plugin. This enables nested content structures.
Example - Callout with nested content:
callout-content element, the slash command menu will only show blocks from the allowed plugins (Paragraph, Heading, List).
Use Cases:
- Callout blocks - Allow paragraphs, lists, and headings inside
- Table cells - Allow any block type inside cells
- Steps content - Allow nested content in step items
- Accordion items - Allow nested blocks inside accordion content
- When the cursor is inside an element with
injectElementsFromPlugins - The slash command menu filters available blocks to only those specified
- Inserted blocks become children of that element
- Each injected block gets its own Slate editor instance
Plugin System
Plugin Structure
A plugin defines:- Type - Unique identifier (e.g., ‘Paragraph’, ‘Table’)
- Elements - Element tree structure with render functions
- Commands - Custom operations for the plugin
- Options - Plugin-specific configuration
- Lifecycle - Hooks for plugin initialization
- Events - Keyboard and interaction handlers
- Extensions - Slate.js editor extensions
Element Definition
Elements define the structure and rendering:Key Features
Headless Architecture
Complete separation of logic and UI. Use the core editor with your own components or choose from pre-built themes.
Slate Per Block
Each block has its own Slate.js editor instance for better performance and isolation.
Element Tree
Hierarchical element structures allow complex nested content like tables, steps, and accordions.
Plugin System
Extensible plugin architecture. Create custom plugins or extend existing ones.
Nested Content
injectElementsFromPlugins allows blocks from one plugin inside elements of another.
TypeScript First
Built with TypeScript for excellent type safety and developer experience.
Drag & Drop
Intuitive drag and drop support, including nested elements and block reordering.
Mobile Friendly
Works seamlessly on mobile devices with touch support and responsive design.
Why Choose Yoopta Editor?
🎨 Complete Customization
🎨 Complete Customization
Every aspect of the editor can be customized - from the UI to the behavior of each plugin.
Create your own plugins or extend existing ones. Use headless core with your own components
or apply ready-made themes.
🚀 Production Ready
🚀 Production Ready
Handles large documents efficiently with automatic lazy loading for media components and
optimized performance. Each block is isolated with its own Slate editor.
💪 Developer Experience
💪 Developer Experience
Built with TypeScript, providing excellent type safety and IDE support. Clear API and
comprehensive documentation. Headless architecture gives you full control.
🌐 Open Source
🌐 Open Source
Free and open source with MIT license. Active community and regular updates.
📦 Modular Architecture
📦 Modular Architecture
Install only what you need. Core editor, UI components, plugins, and themes are separate packages.
Mix and match to build your perfect editor.
Quick Example
Next Steps
Installation
Install Yoopta Editor and its dependencies
Getting Started
Build your first editor in 5 minutes
Core Concepts
Deep dive into editor architecture
API Reference
Complete API documentation
Community & Support
Join our community to get help, share your projects, and contribute:- Discord Community - Chat with the team and community
- GitHub Discussions - Ask questions and share ideas
- GitHub Issues - Report bugs or request features
- Twitter - Follow for updates and news
If you find Yoopta Editor useful, please give it a ⭐️ star on
GitHub!