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

Id Attribute in converted HTML missing #251

Closed AlexanderFinkbeiner closed 3 years ago

AlexanderFinkbeiner commented 3 years ago

When I give an Id to my text block it appears in the mjml but not in the converted HTML. Is there are a way to adjust the conversion that the Id appears on the HTML element (preferably on most outer on) as well?

image

AlexanderFinkbeiner commented 3 years ago

I think I understand it know. The Problem is that MJML is not supporting Ids. And grapesjs-mjml is using the official parser to convert it to HTML. So I guess the parser is just ignoring/deleting the Id.

As a workaround, I'm added "css-class" as a trait. This will be converted to the class attribute in HTML.