HTML
. Here's how you can export the design's HTML.mailui.exportHtml(function (data) {
const json = data.json;
const html = data.html;
console.log(json, html);
});
mailui.exportHtml(function (data) {
const json = data.json;
const html = data.html;
console.log(json, html);
},
{
minify: true,
mergeTags: {
first_name: "John",
last_name: "Author",
}
});
Property | Description | Type |
---|---|---|
json | This is the JSON of the design | JSON |
html | This is the HTML string of the design | string |
Property | Required | Description | Type | Default |
---|---|---|---|---|
amp | No | It optimizes the content to load faster on mobile devices.{ amp: false; } | Boolean | false |
minify | No | The minify option reduces the size of the exported code by removing unnecessary spaces, line breaks, and comments.{ minify: false; } | Boolean | false |
mergeTags | No | mergeTags allows dynamic content to be injected based on specified variables or data tags within the project.{ mergeTags: { first_name: "John", last_name: "Author", } } | Object | |
displayConditions | No | displayCondition allows you to set rules for when and how certain elements or content are displayed, based on conditions like user behavior.{ displayConditions: { ismen: true, iswomen: false, ischild: false, } } | Object |