Preview designs

The editor

Preview designs

See the rendered email at desktop and mobile widths.

Toggle preview from the toolbar to view the design as recipients will, switching device widths. For real client simulations, see inbox previews.

Mobile view shows each block's phone settings (font size, alignment and the rest), the way the email looks on a phone.

Screen width and dark mode#

In Preview, the Preview width menu (it shows the width, for example 1280px) shows the email in a screen of a real device's width, on every plan, free included: laptops and desktops (Surface Book 1500px, MacBook Pro, iMac, MacBook), tablets (Surface Pro 4, iPad Pro 12.9", iPad Pro 11", iPad Air, iPad Mini) and phones (iPhone 15 Pro Max, Pixel 8, iPhone 15, iPhone SE, Galaxy S24). Type any width from 240 to 1600px in its Width box and press Enter; the reset button, or a device button in the toolbar, goes back to that device. The moon button shows the email in dark mode: the design's own dark mode colours apply, whatever your computer is set to. Without it the preview is always light. A desktop or tablet width shows the email in a browser frame.

Change what Preview shows#

Like Unlayer's registerCallback('previewHtml', …): when Preview opens you get the email's HTML with its merge tags still as written ({{first_name}}), and the editor shows the HTML you hand back, for example with a real contact's details filled in. Give nothing back to keep the normal preview. Exports are never affected.

ts
editorRef.current.editor.registerCallback("previewHtml", (params, done) => {
  done({ html: params.html.replaceAll("{{first_name}}", currentContact.firstName) });
});