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    

Templates

Templates are pre-built designs that can be loaded into the editor so your users don't have to start creating everything from scratch in a blank editor.

There are two ways you to manage templates in Unlayer. You can either use Unlayer's template manager, or you can save the templates on your servers.


Unlayer Template Manager (Easy)

Unlayer provides a template manager where your designers can easily create and modify templates. Each template is given a unique ID which can be used during initialization or any time after that.

Here's an example on how you can do it during initialization by passing a templateId.

unlayer.init({
  projectId: 1,
  templateId: 123
});

Or, you can do it after initialization by calling the following function.

unlayer.loadTemplate(1); // 1 is the templateId

On Your Own Servers (Advanced)

If you want to save the templates on your own servers, that can be easily done. Once you create the template in Unlayer's template manager, switch to the JSON tab to get it's JSON. You can save this JSON in your database.

After the editor is initialized, you have to pass the template JSON like this:

var template = {...}; // template JSON
unlayer.loadDesign(template);

Templates


Suggested Edits are limited on API Reference Pages

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