Legacy Templates

This feature allows you to seamlessly integrate and manage your existing library of HTML templates within our platform. This version of the editor offers a classic WYSIWYG experience, designed specifically for users who have a collection of legacy HTML templates. By using the builder in classic mode, you can maintain consistency and continue using your old HTML content while still taking advantage of the powerful features our platform provides.

Key Features

  • Classic WYSIWYG Editor: A familiar and simple editing environment for users who prefer a basic HTML editor, without the need for advanced drag-and-drop functionality.
  • HTML Compatibility: Easily import and edit legacy HTML templates, ensuring backward compatibility with your existing content.
  • Unified Experience: Use the same platform for both new and legacy templates, allowing for a streamlined workflow and consistent template management.

In classic mode, there is no JSON and templates are loaded and exported using HTML only.

Load Design

You can load the legacy design like this.

unlayer.loadDesign({
  html: '<html><body><div>This is a legacy HTML template.</div></body></html>',
  classic: true
});

Export Design

The export function will return HTML.

unlayer.exportHtml(function(data) {
  var html = data.html; // final html

  // Do something with the html
})

Update Event

unlayer.addEventListener('design:updated', function(data) {
  var type = data.type; // html:updated 
  console.log('design:updated', type);
})

Full Example

We have a full example of legacy template. Check it out