Custom JavaScript


MailDeveloper allows writing custom JavaScript to be executed upon exporting HTML. This makes it possible to modify the output HTML in any way desired. The most common usecase is to make a template suitable for use in a third-party service, such as MailChimp or StampReady, out of the box.

The JavaScript is executed in a separate web worker (a sandboxed environment). Regular JavaScript functionality is available, but access to e.g. console and DOM is restricted. You can use whatever version of JavaScript your browser supports (including ES6 features).

The web worker is populated with Cheerio for modifying HTML. Here are a few samples of what can be done:

// Add customization attributes for StampReady
$('.content-wrapper').attr('data-bgcolor', '#EEEEEE');
$('.column-module').attr('data-link-color', '#444444');

// Make an element deletable in Eloqua
$('.spacer').wrap('<span elq-delete="true">');

These are only a few examples, feel free to explore the Cheerio API. It's very similar to jQuery.

MailDeveloper is an advanced editor for HTML emails.
Reduce email development time by hours now.

Try online demo or Read more