Editor component

The editor

Editor component

<EmailEditor /> (the default export of react-email-craft) is the Unlayer-shaped component. Here's every prop it reads.

PropTypeDefaultDescription
refRef<MailkaroIframeEditorRef>-Imperative handle, see Methods.
tokenstring-Publishable embed token (pk_live_…). The editor sends it to the API, which decides which features to enable. No/invalid/expired → free editor.
options{ displayMode?, locale?, mergeTags?, fonts?, … }-Reads displayMode, locale, mergeTags (see Merge tags) and fonts (a list or Unlayer's { customFonts }). Other Unlayer options are accepted and ignored.
onReady(unlayer) => void-Fires once when the editor has finished loading.
onLoad(unlayer) => void-Fires once when the editor is created, before onReady. Calls made here are queued until it is ready.
editorIdstring-Id of the container the editor renders into.
minHeightstring | number500Minimum editor height, like react-email-editor.
styleCSSProperties-Applied to the container the editor fills.
projectstring"embed"Project identifier passed to the runtime.
apiBaseUrlstring"https://api.mailkaro.com"Override the MailKaro API URL. Only for self-hosted/enterprise or local testing (e.g. http://localhost:4000).
googleDriveboolean | object-Show the “Connect Google Drive” tab. See Google Drive.
s3S3PublicConfig | S3PrivateConfig-Show an “Amazon S3” tab. See Amazon S3.
logoUrl / logoAltstring-White-label logo in the palette footer. Takes effect only when the token grants branding.white_label.
Drop-in parity props projectId, appearance, tools and scriptUrl are type-accepted so existing Unlayer code compiles, but the MailKaro editor is styled via its own config.

Need lower-level control?#

For a fully props-driven, non-Unlayer API (design objects, full config, snapshots), use EmailEditor from react-email-craft.