GrapesJS / mjml

Newsletter Builder with MJML components in GrapesJS
http://grapesjs.com/demo-mjml.html
BSD 3-Clause "New" or "Revised" License
618 stars 218 forks source link

Mjml in react,Component cant't draggable #333

Closed yongma16 closed 11 months ago

yongma16 commented 11 months ago

compared to mjml demo,I find a question,react actual render html content lack `

it is render in react page,i think it may cause the component cant not draggle:

`

wraning info: { "errors": [ "Target collection not found", "Component not draggable, acceptable by [[data-gjs-type=\"mj-body\"], [data-gjs-type=\"mj-wrapper\"]]" ], "model": { "tagName": "mj-section", "type": "mj-section" }, "context": "sorter", "level": "warning" }

DreamCloudProject commented 11 months ago

I have the same issue with Lit Element. This problem can be related because React and Lit are using web-components.

yongma16 commented 11 months ago

thank you very much,I solved the problem by the grapes addcomponents api

DreamCloudProject commented 11 months ago

thank you very much,I solved the problem by the grapes addcomponents api

So, what did you exatcly fix? I can't add any blocks to the canvas.

DreamCloudProject commented 11 months ago
image

Here's what I see in the console.

yongma16 commented 11 months ago

thank you very much,I solved the problem by the grapes addcomponents api

So, what did you exatcly fix? I can't add any blocks to the canvas. I write a demo,you can Reference code https://github.com/yongma16/grapes-mjml-react/blob/master/src/views/EmailPage.tsx

yongma16 commented 11 months ago

I have the same issue with Lit Element. This problem can be related because React and Lit are using web-components.

Brother, does the MJML plug-in have an api for converting html to mjml?

DreamCloudProject commented 11 months ago

thank you very much,I solved the problem by the grapes addcomponents api

So, what did you exatcly fix? I can't add any blocks to the canvas. I write a demo,you can Reference code https://github.com/yongma16/grapes-mjml-react/blob/master/src/views/EmailPage.tsx

I have solved a problem. Thanks!

DreamCloudProject commented 11 months ago

I have the same issue with Lit Element. This problem can be related because React and Lit are using web-components.

Brother, does the MJML plug-in have an api for converting html to mjml?

No, I store the original mjml code separately in the database. I only request the parsed HTML to be sent in an email. Accordingly, I request the mjml code in the grapesjs editor.

artf commented 11 months ago

Closing as it seems to be solved.