Closed Robw94 closed 1 year ago
Sorry, the documentation was not updated in time, I will update the documentation later.
You need to change to the following form.
validParentType: [AdvancedType.COLUMN],
const { BlockRenderer } = components;
render({ data, idx, mode, context, dataSource }) {
const instance = MjmlToJson(
`<mj-button background-color="red" css-class="${
mode === 'testing' ? getPreviewClassName(idx, data.type) : ''
}">Hello</mj-button>`,
) as IBlockData;
return <BlockRenderer data={instance} />;
},
Hi Thanks this worked great.
However, I am still having an issue with the dynamic data (for loops).
I have cloned this project, ran locally on vite and when I click 'send' and copy and paste the HTML none of the product list is generating properly. However on your hosted version (demo) it works fine if I copy and paste the html to view it locally.
The merge tags that are not in a condition/loop work fine. Soon as I add a loop to a column they sotp working and no content is shown
The logic block is implemented according to liquidjs, you can check the documentation of liquidjs https://liquidjs.com/
Hello, I have been trying to follow the guide
https://github.com/zalify/easy-email/blob/master/Custom%20block.md
However, when trying to use MJML (other methods work fine) just wanted to use MJML because I can literally copy & paste the mjml code direct from editor for custom blocks. I am getting the following error:
The code I am trying is a direct copy and paste from the provided one.
I am using React 17.0.0 if tha tis an issue?