Calling https://api.mjml.io/v1/render
the service responds, but does not include the full html of the mjml I pass.. It seems to only return what I have in my <mj-preview> tag
Reproduction Steps:
I put together a postman call with what I am passing, and what is being returned. Here is the call, as javascript.
https://jsfiddle.net/86ym01wu/
Here is what is returned
https://jsfiddle.net/dk5om6s7/
Expected behavior:
Expect to see all of the passed mjml returned as html. If I take out the <mj-preview> tag, I only receive an empty <table>
MJML version:
"mjml_version":"3.3.3"
When I paste the MJML into the MJML app, the HTML is rendered properly. Would be happy to share my postman collection if it would benefit anyone. Is there other docs for the MJML service that would perhaps speak to this?
Your markup is using MJML v4 (no mj-container) syntax while the API is running on v3.3.3. We plan to update the API to run on MJML v4, but until then you need to use v3.x.x syntax with the API.
You can find the v3.x.x syntax on the repo, on the relevant branch: https://github.com/mjmlio/mjml/tree/3.3.x/packages.
@ngarnier my apologies.. Guess I should have noticed that. Thanks for the quick reply. Any idea as to when the API will be updated to 4x?
No worries, can't give a date yet but it's on our roadmap. We'll send out an email in advance so you can prepare to migrate.
@ngarnier Just checking in to see if there is any news regarding moving the API to 4x?
Most helpful comment
No worries, can't give a date yet but it's on our roadmap. We'll send out an email in advance so you can prepare to migrate.