![mjml documentation mjml documentation](https://www.cloudkettle.com/wp-content/uploads/2021/03/MJML-15.png)
MJML wouldn't be as cool without its amazing community. Head over here to learn more about the API. APIĪ free-to-use MJML API is available to make it easy to integrate MJML in your application. This js file needs to export an Object with the same structure as a standard JSON. Note that it's also possible to define preprocessors in your mjmlconfig file.
![mjml documentation mjml documentation](https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/b054cfbc-f52b-4ae1-9f4c-6e0c9082f6d8/thrive-market-newsletter-cropped-preview-opt.png)
mjmlconfig file (for custom components use)Īllows to use the config attribute from. Options for html minifier, see mjml-cli documentation for more info Preserve some tags when inlining css, see mjml-cli documentation for more info Functions must be (xml: string) => string Preprocessors applied to the xml before parsing. Path of file, used for relative paths in mj-includes Option to keep comments in the HTML outputĪvailable values for the validator: 'strict', 'soft', 'skip' You can pass optional options as an object to the mjml2html function: optionĭefault fonts imported in the HTML rendered by HTML All you need to do is collect blocks from. Print the responsive HTML generated and MJML errors if any In this build you can find anything you need for a beautiful email list template. Inside Node.js import mjml2html from 'mjml' /* See mjml-cli documentation for more information about config options. Watches the changes made to (file or folder) You can pass optional arguments to the CLI and combine them. Command line interfaceĬompiles the file and outputs the HTML generated in output.html mjml input.mjml -o output.html
#Mjml documentation code#
#Mjml documentation install#
npm install mjmlĭon't want to install anything? Use the free online editor! If you're not sure what those are, head over to Usage for other ways to use MJML. You can install MJML with NPM to use it with NodeJS or the Command Line Interface. MJML’s open-source engine takes care of translating the MJML you wrote into responsive HTML. Its semantic syntax makes it easy and straightforward while its rich standard components library fastens your development time and lightens your email codebase. MJML is a markup language created by Mailjet and designed to reduce the pain of coding a responsive email.