Issue #3441πŸ’¬ AnsweredOpened May 7, 2021by emilsedgh1 reactions

Parser breaks `mj-style` as of 16.30

Quick answerby emilsedgh❀ 1

Hi Artur. Thank you for the great job done on grapesjs. It really is fantastic. The interim solution works just fine. Feel free to close out if necessary, but providing a way of manipulating the behavior would definitely be pretty nice.

Read full answer below ↓

Question

Version: All Grapesjs version from 16.30 to now have this issues. Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? The following is valid MJML code. It should work fine on grapesjs-mjml. Describe the bug detailed Right now, if you use grapesjs-mjml with the code above it will break in 2 ways:It will render the style like this:When you export the code, it exports the MJML code as the following: In both cases, you can see that the style has been html-encoded. What is the current behavior? mj-style is not a textNode and it's content must not be htmlEnc...

Answers (4)

emilsedghβ€’ Aug 3, 2021

Hi Artur. Thank you for the great job done on grapesjs. It really is fantastic.

The interim solution works just fine. Feel free to close out if necessary, but providing a way of manipulating the behavior would definitely be pretty nice.

artfβ€’ Aug 3, 2021

Hi @emilsedgh I apologize for being so late on this issue, but anyway, we can think about how to skip escape in cases like that but probably the fastest way is to simply extend mj-style toHTML method

artfβ€’ Aug 3, 2021

Thanks Emil, for now, I'll close this one, in case another similar issue will arise, we'll think about adding a new prop for skipping the escape.

GJSBlockβ€’ May 17, 2026

Thanks for reporting this, @emilsedgh. The issue with Parser breaks mj-style as of 16.30 appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, creating an inconsistent state. What to try: Add a setTim...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.