Closed hyakki closed 6 years ago
Hi @maximeparisse !
Well, I have no real answer for that, did you try to import mjml-column
and push your tagName it to .parentTag
? I think this could work.
In MJML4 this will be way easier to push new dependencies to the core, you'll be able to inject them with a simple API.
Hummm, thanks for the answer @iRyusa, i will try that even if i'm not really expert with jsx and react components.
By any chance, do you have an approximative release date for mjml4 ?
PS : When you say i should import mjml-column, in which file/step in the process would i be supposed to do that ?
Well we're working to get as many components ready to release a minimal beta with base components ( like section column image text divider ... ). So no date yet, but a beta should be available this month ( april ).
Directly in your components, you may have to add the package mjml-column
to your package.json
i have the same Problem:
<section>
<custom-component>
<mj-text>
...
</mj-text>
</custom-component>
</section>
is this supposed to be working? The Compiler tells me that it does not work by design:
Line 111 (mj-text) — mj-text cannot be used inside robo-speechbouble, only inside: mj-column, mj-hero-content
Is there a update-save way to extend the parent-tag of a core comp?
As said, dependencies are hard coded into components in MJML3. You can try to edit the MjText.parentTag @Laslo89 but I don't know if it works
Note that validation is completely and purely optional, your document will render fine in a skip/soft
level.
In MJML 4 it will be completely different, components are independent and you'll have to define dependencies explicitely
should be possible now with mjml-validator/registerDependencies
👆 Closing the issue because it's available in the Beta. Feel free to reopen if you have any issue with it !
Hello.
I'm playing a bit with custom components but i have a little issue with it.
Let say i've created a custom component
<epic-section>
, that is the<mjml-section>
base code with some modifications.How can i tell to core components (
<mjml-column>
for example ) it can now be in a parentepic-section
and not only inmj-section
,mj-group
ormj-navbar
?