MJML Code Editor
Use MJML Code when your team wants to author a responsive email in markup. MJML describes the layout in email-specific components, and maxclicks compiles them into the HTML email clients receive. Customer data, brand controls and personalization use the shared composer.
Reach for it when you already have MJML to paste in, when you need an attribute the visual builder does not expose, or when you prefer working in code. For the same layout built visually, use the Dynamic Composer.
The tags you will use most
| Tag | What it gives you |
|---|---|
<mj-section> | A full-width horizontal row. |
<mj-column> | A column inside a section. |
<mj-text> | A block of text. |
<mj-button> | A call-to-action button. |
<mj-image> | An image. |
<mj-divider> | A horizontal rule. |
<mj-spacer> | Vertical space. |
Write the subject and the body
Subject is a single line. Body MJML is the markup, in a code area with line numbers and a minimap.
Both fields accept Liquid and Adaptyle, so the subject can be personalized as well as the body. The editor colors MJML, Liquid and Adaptyle together, and underlines Liquid that will not resolve against your sample data before you render anything.
There is no auto-format here. Lay out your markup the way you want to read it, because maxclicks will not reindent it for you.
Set the sender and the recipient
From and To sit above the subject, the same as in every other editor. See the editor overview for what each one accepts.
Use your brand kit instead of hard-coded values
The brand kit you select in email setup arrives as branding, so write {{ branding.logoUrl }} rather than pasting the link. Colors and fonts come through the same way. References resolve when the email is rendered; sent emails and frozen broadcasts keep their existing values. See brand-kit changes.
Coming from the Dynamic Composer
The Dynamic Composer can hand its layout over to this editor, written out as MJML source with your Liquid and Adaptyle intact.
That switch is one-way. Once the email is MJML source there is no way back to the visual blocks, and maxclicks asks you to confirm before doing it.
Work within the email renderer’s limits
Use email-safe HTML with absolute resource URLs. Final rendering rejects active content such as scripts, iframes, forms, event-handler attributes and unsupported URL schemes. It also enforces size and structure limits: a nonempty single-line subject up to 4,096 bytes, a final HTML artifact up to 1 MiB, at most 6,000 elements and nesting no deeper than 80 levels.
During AI personalization, existing links, attributes, stylesheets and protected layout context must remain intact. Put prompts inside the text you want rewritten; change markup and destinations while authoring the draft. An “invalid final artifact” error requires fixing the content, even if a browser could display it.
The Outline, Personalize, Data and Checks tabs share the same behavior as the email editor. Ask maxinja to make a specific source edit, then render and send a test to review the compiled result.
Related
- Dynamic Composer: build the same MJML visually.
- HTML code editor: hand-written HTML, where the responsiveness is yours.
- Fonts: which fonts survive the trip to an inbox.