Overview
Plugins are the building blocks of Yoopta Editor. Each plugin represents a specific type of content block (paragraph, heading, image, etc.) and defines how that content is rendered and behaves. Every plugin in Yoopta Editor is built using theYooptaPlugin class, which provides a consistent API for defining block types, handling events, managing state, and extending functionality.
Plugin Architecture
YooptaPlugin Class
All plugins are created using theYooptaPlugin class constructor:
Plugin Structure
Each plugin configuration consists of:Defines the structure and rendering of plugin elements. Can be an object or JSX syntax
Available Plugins
Yoopta Editor provides 20+ built-in plugins:Using Plugins
Plugins are passed tocreateYooptaEditor, not to <YooptaEditor>. The component only receives the editor instance.
Basic Usage
Headings Plugin
The Headings plugin exports multiple heading types:Lists Plugin
The Lists plugin exports multiple list types:Plugin Configuration
Most plugins accept configuration options when you callplugin.extend({ options: { ... } }). Pass the resulting plugins array to createYooptaEditor({ plugins, marks }), not to <YooptaEditor>.
Image Plugin
Code Plugin
Video Plugin
Plugin Methods
extend()
Extend a plugin with custom options or elements (UI):Defining Elements
Elements can be defined in two ways: 1. Object Syntax:Element Properties
Placeholder text shown when this element is focused and empty. Set via Element-level placeholders take priority over the editor-level
.extend():placeholder prop. For nested plugins (Steps, Accordion), each element can have its own placeholder. See Editor Placeholders for the full guide.Custom elements (renders)
Override default rendering by extending with customelements:
Plugin Events
Handle plugin-specific events:Plugin shortcuts
Configure slash-menu shortcuts viaoptions.shortcuts (array of strings). Plugin-specific hotkeys are defined in the plugin’s events.onKeyDown or in options. Use Blocks.toggleBlock(editor, 'Code', { preserveContent: true }) for programmatic block type change.
Common Plugin Options
Most plugins support these common options:Display configuration -
title - Display name in UI - description - Plugin description - icon- Custom icon component
Plugin Loading Order
The order of plugins in the array affects:- Menu display order
- Transform priority
- Shortcut precedence
Best Practices
- Always include the Paragraph plugin — it’s the default block type
- Define your
pluginsarray outside the component to prevent recreation on every render - Use
extend()to customize plugins instead of modifying plugin objects directly - For plugins with async operations (uploads), always handle errors and loading states
Lifecycle Hooks
Lifecycle hooks allow you to run code at specific points in a block’s lifecycle:Available Lifecycle Hooks
Parsers
Parsers handle serialization and deserialization of content:Next Steps
Paragraph Plugin
Learn about the basic text plugin
Image Plugin
Working with images and uploads
Code Plugin
Syntax-highlighted code blocks
Table Plugin
Create and manage tables

