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:string
required
Unique identifier for the plugin (e.g., ‘Paragraph’, ‘Image’, ‘Code’)
object | JSX.Element
required
Defines the structure and rendering of plugin elements. Can be an object or JSX syntax
object
Configuration options including display settings and shortcuts
object
Methods for manipulating plugin content programmatically
object
Event handlers for keyboard, mouse, and other DOM events
object
Hooks that run at specific points in the plugin lifecycle
object
Serialization and deserialization for HTML, Markdown, and Email
function
Slate editor extensions for custom behavior
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
function
required
React component that renders the element
object
Default props for the element
'block' | 'void' | 'inline'
Type of Slate node. Default is ‘block’
string
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:object
Display configuration -
title - Display name in UI - description - Plugin description - icon- Custom icon component
string[]
Keyboard shortcuts to trigger the plugin
object
Slate-specific configuration
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
(editor: YooEditor) => SlateElement
Called before a block is created. Return the initial structure
(editor: YooEditor, block: YooptaBlockData) => void
Called after a block is created
(editor: YooEditor, block: YooptaBlockData) => void
Called before a block is destroyed
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

