attilabuti / vscode-mjml

This repo is archived. MJML preview, lint, compile for Visual Studio Code.

Home Page:https://marketplace.visualstudio.com/items?itemName=attilabuti.vscode-mjml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the preview don't work

enhancer opened this issue · comments

Hi,
The preview don't work , with mjml file i have no message to this code :





Hello World!




with the html file i have the message "Active editor doesn't show a MJML document."

Hello @enhancer

The preview doesn't work, because the "Hello World!" is not a valid MJML document.

MJML CLI:
Error: [MJMLError] EmptyMJMLError: No root "<mjml>" or "<mj-body>" found in the file, or "<mj-body>" doesn't contain a child element.

Working example:

<mjml>
    <mj-body>
        <mj-container>
            <mj-section>
                <mj-column>
                    <mj-text>Hello, World!</mj-text>
                </mj-column>
            </mj-section>
        </mj-container>
    </mj-body>
</mjml>

MJML Documentation