Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will it work with MJML? #77

Open
GeorgBNM opened this issue Mar 8, 2024 · 6 comments
Open

Will it work with MJML? #77

GeorgBNM opened this issue Mar 8, 2024 · 6 comments

Comments

@GeorgBNM
Copy link

GeorgBNM commented Mar 8, 2024

Actually trying, to get it working with MJML.
Otherwise, the output will not be consistent on all email-programs.

Any clue about?

@ChrisRAoW
Copy link
Owner

To be honest, I didn't tested with MJML / GrapeJS builder. Did you already tried it? If you encountered issues, can you share what you stumbled upon?

@GeorgBNM
Copy link
Author

GeorgBNM commented Mar 11, 2024

Hi Chris,

Thanks for your message.

It will only work within the MJML markup, for instance:

<mj-text>

{feed url="<<FEEDURL>>"}
    {feeditems}
        <h3>{feeditem:title}</h3>
        <p><small>{feeditem:date format="d-m-Y H:i"}</small></p>
        <p>{feeditem:description}</p>
        <p><img src="{feeditem:image}"></p>
    {/feeditems}
{/feed}

</mj-text>

But not in this way (needed):

<mj-column>

{feed url="<<FEEDURL>>"}
    {feeditems}
        <mj-text>{feeditem:title}</mj-text>
        <mj-text><small>{feeditem:date format="d-m-Y H:i"}</small></mj-text>
        <mj-text>{feeditem:description}</mj-text>
        <mj-image width="100px" src="{feeditem:image}"></mj-image>

    {/feeditems}
{/feed}

</mj-column>

This will not be processed.

Any clue about that?
Escaping with
<mj-raw></mj-raw>
didn't work either.

Thank you!

Best,
Georg

@ChrisRAoW
Copy link
Owner

@GeorgBNM I'm not really familiar with MJML, so sorry if I'm asking silly questions ;-) But why not put the mj-text within the mj-column?

@GeorgBNM
Copy link
Author

Sorry, for late reply.

Tried this out. Does not work.

Always, if some elements are within mj elements, they will not be rendered.

<mj-image width="100px" src="{feeditem:image}"></mj-image>

This will not work.

Maybe you've another idea?

Thanks 🙏

@ChrisRAoW
Copy link
Owner

@ChrisRAoW I will try to find some time soon to figure this out

@GeorgBNM
Copy link
Author

@ChrisRAoW Your help is very appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants