MJML preview, lint, compile for Visual Studio Code.
- Live preview for MJML files. Preview updates as you type. Preview based on html-preview-vscode.
- Inline errors (squiggle underlines). Linter based on atom-linter-mjml.
- Export HTML file from MJML.
- Copy the result HTML to clipboard.
- Take a screenshot of the rendered MJML document.
- Send email with Mailjet.
Press F1
, type ext install vscode-mjml
.
Start command palette (with Ctrl+Shift+P
or F1
) and start typing MJML
.
The following command is available:
- MJML: Export HTML Export HTML file from MJML.
- MJML: Open Preview to the Side Opens a preview in a column alongside the current document.
- MJML: Screenshot Take a screenshot of the rendered MJML document, and save it as a file.
- MJML: Copy HTML Copy the result HTML to clipboard.
- MJML: Send Email Send email with Mailjet.
Name | Default | Description |
---|---|---|
mjml.lintEnable |
true |
Enable/disable MJML linter (requires restart). |
mjml.lintWhenTyping |
true |
Whether the linter is run on type or on save. |
mjml.updateWhenTyping |
true |
Update preview when typing. |
mjml.preserveFocus |
true |
Preserve focus of Text Editor after preview open. |
mjml.minifyHtmlOutput |
true |
Minify HTML output. |
mjml.beautifyHtmlOutput |
false |
Beautify HTML output. (Works when mjml.minifyHtmlOutput aren't enabled.) |
mjml.screenshotWidth |
650 |
Screenshot width. |
mjml.screenshotType |
jpg |
Screenshot type. Possible values are 'png', 'jpg', and 'jpeg'. |
mjml.screenshotQuality |
75 |
Screenshot quality. |
mjml.mailjetAPIKey |
|
Mailjet API Key. |
mjml.mailjetAPISecret |
|
Mailjet API Secret. |
mjml.mailSender |
|
Sender email address. (Mailjet: must be a verified sender.) |
mjml.mailFromName |
|
Sender name. |
mjml.mailSubject |
|
Email subject. |
mjml.mailRecipients |
|
Comma separated list of recipients email addresses. |
- #5: .mjmlconfig is now supported.
- [new] Configuration property
mjml.mailjetAPIKey
: Mailjet API Key. - [new] Configuration property
mjml.mailjetAPISecret
: Mailjet API Secret. - [new] Configuration property
mjml.mailSender
: Sender email address. (Mailjet: must be a verified sender.) - [new] Configuration property
mjml.mailFromName
: Sender name. - [new] Configuration property
mjml.mailSubject
: Email subject. - [new] Configuration property
mjml.mailRecipients
: Comma separated list of recipients email addresses. - [new]
MJML: Copy HTML
: Copy the result HTML to clipboard. - [new]
MJML: Send Email
: Send email with Mailjet. - Some other small improvements.
- Added PhantomJS-rebuild functionallity in order to build PhantomJS for the propper OS. Based on MarkdownConverter.
- #3: fixed preview issue.
- [new] Configuration property
mjml.lintWhenTyping
: whether the linter is run on type or on save. - [new] Configuration property
mjml.minifyHtmlOutput
: minify HTML output. - [new] Configuration property
mjml.beautifyHtmlOutput
: beautify HTML output. (Works whenmjml.minifyHtmlOutput
aren't enabled.) - [new] Configuration property
mjml.screenshotWidth
: screenshot width. - [new] Configuration property
mjml.screenshotType
: screenshot type. Possible values are 'png', 'jpg', and 'jpeg'. - [new] Configuration property
mjml.screenshotQuality
: screenshot quality. - [new]
MJML: Screenshot
: Take a screenshot of the rendered MJML document, and save it as a file. - Fixed background-url path issue.
- Lint when a MJML file is opened.
- Some other small improvements.
- #1: fixed image path issue.
- #2: fixed mj-include issue.
- [new] Configuration property
mjml.preserveFocus
: preserve focus of Text Editor after preview open. - [new] Configuration property
mjml.updateWhenTyping
: update preview when typing. MJML: Open Preview
was renamed toMJML: Open Preview to the Side
MJML: Generate HTML
was renamed toMJML: Export HTML
- MJML 3.3.3
- Some fixes.
- This is the initial release of this extension.
Submit the issues if you find any bug or have any suggestion.
Fork the repo and submit pull requests.
A big thanks to the people that have contributed to this project:
- Christian Brevik (@cbrevik) - contributions)
This extension is licensed under the MIT License.