Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rogueturnip opened this issue Dec 8, 2023 · 1 comment
Closed

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

rogueturnip opened this issue Dec 8, 2023 · 1 comment

Comments

@rogueturnip
Copy link

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!

@artf
Copy link
Member

artf commented Aug 21, 2024

You can use findType

@artf artf closed this as completed Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants