GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS

Home Page:http://grapesjs.com/demo-mjml.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

adding mj-styles or mj-head if they don't exist

rogueturnip opened this issue · comments

Hi!

I'm trying to setup my editor so that it can check the mjml content that's about to be used to validate it has the mj-head take with particular styles in mj-styles. I've tried using the getComponents followed by component.get (with a filter) to find those tags but it returns empty.

Is there a specific way I can validate the head exists and then the style that I'm looking for and if it doesn't use addComponent to insert the styles?

Thanks!