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

Is mj-attributes broken in grapesjs? #269

Open
TechBill opened this issue Dec 2, 2021 · 6 comments
Open

Is mj-attributes broken in grapesjs? #269

TechBill opened this issue Dec 2, 2021 · 6 comments

Comments

@TechBill
Copy link

TechBill commented Dec 2, 2021

mj-attributes seems having no effect to the layout of mjml. I had to apply attribute to each components.

Using the "try it now" over at mjml, the mj-attributes is working as intended.

@apuntovanini
Copy link

I confirm this! (or maybe we both make the same mistake)

@apuntovanini
Copy link

apuntovanini commented Jan 21, 2022

It seems tags for mjml-attributes are not properly closed

<mj-attributes>
  <mj-all padding="5px" />
  <mj-button background-color="red" />
</mj-attributes>

seems to convert into

<mj-attributes>
  <mj-all padding="5px"><mj-button background-color="red"></mj-button></mj-all>
</mj-attributes>

Still doens't apply shared styles even if this is manually fixed, so the issue may be elsewhere

@ronaldohoch
Copy link

Are you guys using mj-attributes inside mj-head as shown in documentation?
https://documentation.mjml.io/#mj-attributes

@apuntovanini
Copy link

Yes, it's inside

@beatwiz
Copy link

beatwiz commented Feb 1, 2024

Still happening on latest versions.

In mjml.io "try it live" this works with direct effect on the content:

    <mj-attributes>
      <mj-all padding="100" />
      <mj-text color="#000" font-size="26px" line-height="1.3" />
    </mj-attributes>

While on GrapeJS, this has no effect:

    <mj-attributes>
      <mj-all padding="100" />
      <mj-text color="#000" font-size="26px" line-height="1.3" />
    </mj-attributes>

And gets converted during import to:

    <mj-attributes>
      <mj-all padding="100">
        <mj-text color="#000" font-size="26px" line-height="1.3">
        </mj-text>
      </mj-all>
    </mj-attributes>

Thanks in advance!

@RakulAgn
Copy link

The MJ-ATTRIBUTES supported in grapesjs-mjml ? i just try to implement a global style concept for that if the mj-attributes and mj-class is there it could be usefull

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

5 participants