Quick start
UsecomposeReactEmail to convert editor content into email-ready HTML and plain text.
How it works
ThecomposeReactEmail function follows this pipeline:
- Read the editor’s JSON document
- Traverse each node and mark in the document tree
- Call
renderToReactEmail()on eachEmailNodeandEmailMarkextension - Apply theme styles via the
SerializerPlugin(ifEmailThemingis configured) - Wrap the content in a
BaseTemplatecomponent - Renders to an HTML string and plain text version using render
Preview text
Thepreview parameter sets the email preview text.
Email preview text is the snippet shown in inbox list views before the email is opened.
null to omit preview text.
Using with theming
When theEmailTheming extension is in your extensions array, theme styles are automatically
injected into the exported HTML.
The serializer uses the SerializerPlugin provided by EmailTheming to resolve styles for each node based on the current theme and depth in the
document tree.
Full example with export panel
Here’s a complete editor with theming and an export panel.Examples
See email export in action with runnable examples:Email Export
Export editor content to themed HTML.
Full Email Builder
Complete editor with theming, menus, and export.