Migration guide
Getting startedMigrating from Unlayer
Change one import, your designs and code keep working.
Swap react-email-editor → react-email-craft (or the vue / angular / vanilla equivalent). Existing Unlayer designs auto-convert on load; the ref API, events and options are compatible. See Unlayer compatibility.
Package names
react-email-editortoreact-email-craftvue-email-editortovue-email-craftangular-email-editortoangular-email-craft- Unlayer's
embed.jsscript tovanilla-email-craft, which defines themailkaroglobal: renameunlayer.calls tomailkaro.(mailkaro.createEditor,mailkaro.init)
Options that change
- Add a
token, your publishablepk_live_…key.projectIdis still accepted so old code compiles, but it is ignored; the token identifies the project. displayMode: "page"is accepted and means thewebcanvas.fonts: { customFonts }and merge tags as an object or an array work as they are.
Saved designs
There is nothing to migrate in your database. A design counts as Unlayer JSON when it has Unlayer's numeric schemaVersion or columns that still hold contents; the editor and every render function in email-craft-sdk convert it when they load it. To convert once and store the result, call unlayerToMailkaro(design). isUnlayerDesign(design) tells you which saved records still need it.
Checking the setup
Listen for the error event (onError in React). It reports invalid_embed_token, domain_not_allowed, token_expired, runtime_unreachable (the editor then runs on the free plan) or editor_not_started (the frame did not answer within 20 seconds).