Error on change trait in MJML component #4022
Unanswered
ronaldohoch
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys,
I have a custom component using MJML in a fork of https://github.com/artf/grapesjs-mjml
This is the block i'm using:
Rss.js
In the block, i have this attributes:

Nothing wrong until now: (This part is already solved, but stills with the event problem)

When mjml compile to html, it takes all this
data-something
and turn it into styles:So, i have this trait configured:

And this event should change this attribute, the same code works if it is not in mjml.
But, when i change it, the

addAttribute
remove all style from it and don't add the value from field neither the data-attributes in htmlTried this code too but it didn't listen on trait change:
So, is there a way to listen to the change events and update these attributes and replace them in the html version?
Beta Was this translation helpful? Give feedback.
All reactions