EmailEditor is the highest-level way to embed the React Email editor. It wraps
Tiptap’s EditorProvider, mounts the default editor UI, and exposes a ref API
for exporting HTML, plain text, and JSON.
Use it when you want a batteries-included editor. If you need full control over
the provider, overlays, or extension list, compose the editor from the lower-level
APIs instead.
Import
Signature
Default behavior
When rendered without a customextensions prop, EmailEditor configures:
StarterKitPlaceholderEmailTheming- The default text
BubbleMenu BubbleMenu.LinkDefaultBubbleMenu.ButtonDefaultBubbleMenu.ImageDefault- The built-in slash command menu
onUploadImage is provided, the image upload extension is
appended automatically.
Props
Initial editor content. Accepts TipTap JSON or an HTML string.
Called on every content update. The callback receives the same helper object
exposed through the component ref.
Called once after the editor instance is mounted and ready.
Built-in theme preset or custom theme object used by the default
EmailTheming extension.Toggles read-only mode for the editor content.
Overrides the default placeholder text. When omitted, paragraphs show
Press '/' for commands.Configures when the default text bubble menu should stay hidden.
Replaces the default extensions array. Use this when you want more control
over the editor schema or plugin list.
Enables image upload for paste, drop, and image insertion flows. Resolve with
the final hosted image URL. See Image Upload
for setup patterns and Image Upload API
for the lower-level hook, commands, and types.
Applied to the underlying editor container element.
Additional UI rendered inside the internal
EditorProvider. Children render
as siblings of the editor content area, which makes layouts like split-pane
editors and inspector sidebars work naturally.bubbleMenu options
Prevents the default text bubble menu from appearing when one of these node
types is active.
Prevents the default text bubble menu from appearing when one of these mark
types is active.
Ref API
Serializes the current document to email-ready HTML and plain text in one
call.
Returns only the HTML export.
Returns only the plain text export.
Returns the current TipTap JSON document.
The underlying TipTap editor instance.
null until the editor is ready.Before the editor is ready, the export methods resolve to empty output and
getJSON() returns an empty document with type: 'doc' and an empty
content array.