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    

HTML is a built-in tool so users can add custom HTML to their designs. This tool is supported for both display modes: emails and web pages.

Enable / Disable

HTML tool is enabled by default but you can choose to disable it.

unlayer.init({
  tools: {
    html: {
      enabled: false
    }
  }
});

Default Values

HTML tool comes with the following default values. You can choose to change any of these.

Property

Default Value

html

<strong>Hello, world!</strong>

containerPadding

10px

Here are a few examples on how to change these default values.

HTML

unlayer.init({
  tools: {
    html: {
      properties: {
        html: {
          value: '<strong>Hello, world!</strong>'
        }
      }
    }
  }
});

Container Padding

unlayer.init({
  tools: {
    html: {
      properties: {
        containerPadding: {
          value: "10px"
        }
      }
    }
  }
});

Updated 5 months ago


HTML


Suggested Edits are limited on API Reference Pages

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