Unlayer Documentation

Unlayer Documentation

Welcome to Unlayer Documentation. It takes less than 5 minutes to get our editor up and running on your project.

These guides will take you through the process and get you up and running.

Get Started    Changelog

Merge Tags

Merge tags allows users to dynamically add content to their email. Merge tags can be inserted into a block of text by clicking on the "Personalize" button in the text editor toolbar. The button is not shown if no merge tags were passed when initializing Unlayer.

We support all types of merge tags. Whether you use curly brackets {{ ... }} or square brackets [ ... ] or any other.

This is how it looks if you have merge tags...

Passing Merge Tags

There are 2 ways you can pass your merge tags to Unlayer.

Option 1) You can pass merge tags during initialization like this:

unlayer.init({
  mergeTags: [
    {name: "First Name", value: "{{first_name}}"},
    {name: "Last Name", value: "{{last_name}}"}
  ]
});

Option 2) You can pass merge tags after initialization like this:

unlayer.setMergeTags([
  {name: "First Name", value: "{{first_name}}"},
  {name: "Last Name", value: "{{last_name}}"}
]);

Merge Tags


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.