GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS
http://grapesjs.com/demo-mjml.html
BSD 3-Clause "New" or "Revised" License
618 stars 218 forks source link

Is mj-attributes broken in grapesjs? #269

Open TechBill opened 2 years ago

TechBill commented 2 years ago

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 commented 2 years ago

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

apuntovanini commented 2 years ago

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 commented 2 years ago

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

apuntovanini commented 2 years ago

Yes, it's inside

beatwiz commented 5 months ago

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 commented 2 months ago

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

DiegoGonzalezCruz commented 1 week ago

Hello everybody, did anybody find how to bypass this limitation? I am having the same issue.