Skip to content

Getting started

TIP

For syntax highlighting you can install plugin for Visual Studio Code, and for WebStorm connect web-types

Insert the following JavaScript code immediately after the <body> tag:

html
<script type="text/javascript">
var s=document.createElement("script"),l=document.createElement("link"),d=new Date;s.setAttribute("src","https://app.pixcraft.io/tjml/app.js?ver="+d.getTime()),l.setAttribute("type","text/css"),l.setAttribute("rel","stylesheet"),l.setAttribute("href","https://app.pixcraft.io/tjml/app.css?ver="+d.getTime()),document.head.appendChild(l),document.body.appendChild(s);
</script>

Structure of the email

html
<tjml>
    <m-body>
        <!-- some TJML code -->
    </m-body>
</tjml>

You can insert any TJML or HTML code between <m-body> and </m-body>, but remember that not all HTML code will work correctly in the AMP version of the email.