Migration guide

Getting started

Migrating 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-editor to react-email-craft
  • vue-email-editor to vue-email-craft
  • angular-email-editor to angular-email-craft
  • Unlayer's embed.js script to vanilla-email-craft, which defines the mailkaro global: rename unlayer. calls to mailkaro. (mailkaro.createEditor, mailkaro.init)

Options that change

  • Add a token, your publishable pk_live_… key. projectId is still accepted so old code compiles, but it is ignored; the token identifies the project.
  • displayMode: "page" is accepted and means the web canvas. 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).