Parser breaks `mj-style` as of 16.30
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)
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.
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
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.
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.
Issue #3693
AdoptStylesheet not supported in grapesJS
Version: You can get the version by typing grapesjs.version into the console 0.17.22 Are you able to reproduce the bug from the demo?[x] Ye...
Issue #3612
The grapesjs slider buttons, tabs are not working as expected
Version 0.17.19(grapesjs) Version 0.1.5(grapesjs-lory-slider) Version 1.0.6(grapesjs-tabs) Are you able to reproduce the bug from the demo?...
Issue #3131
Paste as plain text into Text component adds <font /> wrapper to pasted text
Version: 0.16.27 Are you able to reproduce the bug from the demo? [] Yes [X] No What is the expected behavior? Paste as plain text (text no...
Issue #3396
Flex-direction: column & float: left make sorter direction incorrect
Version:0.16.45 Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? Given a parent element with di...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins β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.
Tutorial
UnStudio for GrapesJS: 4 Plugins to Build Better Visual Editors
Meet UnStudio, a new GrapesJS plugin studio with four tools, safer and better editor: Command Palette, Responsive Pack, Autosave & Restore, and Autofill
Tutorial
Messaging on gjs.market: talk to a studio before you buy, not after
We've launched private messaging between buyers and studios. One thread per buyerβstudio pair, the whole history in one place.
Tutorial
GrapesJS DevTools: A Developer Panel Inside Your Editor
If you've ever debugged GrapesJS with console.log(editor.getSelected()) and a dozen throwaway event listeners β this post is for you.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.