Describe the bug
The parser doesn't seem to render HTML when used inside of a MJML component, even though that HTML is within a <mj-text> tag.
To Reproduce
Steps to reproduce the behavior:
/components/MjBasicComponent.js from the Boilerplate<div> wrapper in the render section (just to have strictly p and span)render by return this.renderMJML( and its associated closing tag.<mj-text></mj-text> tags.mjmlconfig to add "./lib/MjHtmlDebug.js",gulp build, looked in MJML App, every other component render, but not the content of HTML within custom component.Expected behavior
I'd expect the HTML content of <mj-text> to render, just like it does when not in a custom component.
MJML environment (please complete the following information):
10.14.5 (18F132)2.12.0v^4.4.110.16.33.9.0cc @kmcb777 can you take a look at this ?
That was a tricky one, actually the import of mj-core in the component cause the component to be rendered by this instance of mj-core. Here it will be rendered by the mj-core in gulp-mjml node_modules. Mj-core alone doesn't know about mj-text, to register base components we need to call
import 'mjml'
before the
import { BodyComponent } from 'mjml-core' at the top of the file.
I leave this open until we add this info in the doc and the boilerplate
Awesome, that works! Thanks 馃帀
Should we move this in the boilerplate repo instead ?
Most helpful comment
That was a tricky one, actually the import of mj-core in the component cause the component to be rendered by this instance of mj-core. Here it will be rendered by the mj-core in gulp-mjml node_modules. Mj-core alone doesn't know about mj-text, to register base components we need to call
import 'mjml'before the
import { BodyComponent } from 'mjml-core'at the top of the file.I leave this open until we add this info in the doc and the boilerplate