GrapesJS / mjml

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

mj-font not working on 1.0.5 #370

Closed irfanhanfi closed 3 weeks ago

irfanhanfi commented 3 weeks ago

mj-font tag is not loading fonts inside the editor when I use the 1.0.5 version of it whereas it is working for ^0.5.8 -

mjml body -

<mjml>
    <mj-head>
      <mj-font
        name="Matemasie"
        href="https://fonts.googleapis.com/css2?family=Matemasie&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"
      />
    </mj-head>
    <mj-body>
      <!-- Your MJML body here -->
      <mj-section>
        <mj-column>
          <mj-text>My Company</mj-text>
          <mj-text font-family="Matemasie, Arial">My Company</mj-text>
          <mj-text
            align="center"
            font-size="24px"
            line-height="1.5"
            color="#6f6f6f"
            font-weight="700"
            font-family="Matemasie, Arial"
          >
            <p>My Text</p>
          </mj-text>
        </mj-column>
      </mj-section>
    </mj-body>
  </mjml>

Working code - https://js-nrkfyf.stackblitz.io/

image

Dependencies -

{
    "grapesjs": "^0.17.29",
    "grapesjs-mjml": "^0.5.8"
  }

Not Working - https://js-vuvhde.stackblitz.io/

image

Dependencies -

{
    "grapesjs": "^0.21.2",
    "grapesjs-mjml": "1.0.5"
  }