Skip to main content

Email Builder

This guide walks you through embedding Unlayer's drag-and-drop email builder into your web application — from installation to saving the finished design.


Step 1: Install the SDK

Add the script tag to your HTML:

<script src="https://editor.unlayer.com/embed.js"></script>

Step 2: Initialize the Editor

Recommended Size

For the best experience, ensure the editor container is at least 1024px wide and 700px high. The editor will expand to fill the entire container.

<div id="editor-container" style="height: 700px;"></div>

<script>
unlayer.init({
id: 'editor-container',
displayMode: 'email',
projectId: 1234, // Replace with your project ID
});
</script>

Where to get the Project ID?

  1. Log in to the Developer Console
  2. Create a Project
  3. You can find the project ID in Project > Builder > Settings

What's Next