TJML Framework markup language is named TJML. It is built on Vue, so every TJML tag is a Vue component. To get started, you need to include our JavaScript library, and when the email is ready, export the resulting HTML code.
IDE | Description |
JetBrains IDEs (WebStorm, PhpStorm) |
You can use web-types to autocomplete TJML tags and attributes. Or use the start pack for fast dive. |
Visual Studio Code | Install plugin from Marketplace or github |
Insert the following JavaScript code immediately after the <body>
tag:
<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>
You need to stick to the following structure of the document: You can insert any TJML or email HTML code between the <m-body>
and </m-body>
tags. Please note that regular email HTML code will not allow for the creation of an AMP version of the email.
<tjml>
<m-body>
<!-- some TJML code -->
</m-body>
</tjml>
You can find detailed information about all the available tags (components) and attributes in these docs.