![]() The editor seems to be loaded, however, the result I'm getting is as follows: MJML is not rendered properly. MJML components are rendered in real-time using the official v4 compiler (+ some mocks to make it run in the browser), therefore the result is, almost, the same as using the MJML Live Editor. I'm trying to integrate GrapesJS MJML into my Vue based application and I'm not able to configure it properly. Which you can then convert to seconds like this: Math.round(new Date().getTime()/1000)Īnd you can also use the valueOf method which we showed above: new Date(). To get the CSS of the page,i did editor.getCss () It gave the page css, then joined HTML and CSS to get the complete Code. GrapesJS MJML Requires GrapesJS v0.15.9 or higher This plugin enables the usage of MJML components inside the GrapesJS environment. However, if you don't want a shim & maximum compatibility, you could use the "old" method to get the timestamp in milliseconds: new Date().getTime() It's slightly better because it's shorter & doesn't create a new Date object. I would recommend using Date.now() (with compatibility shim). We learn everything about sections, block and other building bricks. (also see this answer or this with further explaination to bitwise operators). We will look at the structure of a real life MJML template. Rate Share Website URL Have an email template builder to share Tell the world how your tool helps email marketers send better emails and get discovered by more people. Which should be slightly faster, but also less readable. Create a MJML Template and place it within your application Creating a nice looking template can be easily done by using an dynamic builder tool like When. After digging into a bug my team has seen after upgrading from grapesjs v0.18.4 to v0.19.5. This plugin enables the usage of MJML components inside the GrapesJS environment. GrapesJS MJML Open Source Newsletter Builder with MJML components in GrapesJS. Or alternatively you could use: Date.now() / 1000 | 0 To get the timestamp in seconds, you can use: Math.floor(Date.now() / 1000) Everything is fine but I am stuck in part where I need to get the HTML and CSS of the template created with it. ![]() ![]() I am writing a Django app for newsletter, in which I need a newsletter editor for which I used "grapes.js" newsletter. How to get output HTML and CSS of grapes.js in Javascript ?
0 Comments
Leave a Reply. |