Mailtrain-org / mailtrain

Self hosted newsletter app
GNU General Public License v3.0
5.52k stars 692 forks source link

unable to edit MJML in GrapeJS in Firefox #334

Closed bbbart closed 7 years ago

bbbart commented 7 years ago

Hi,

This might be a GrapeJS or even Firefox issue, but I thought I'd ask here first. I created a template for Mailtrain using the GrapeJS import MJML feature. I can send this template out without any problems, preview it, etc...

When I try to edit it (in GrapeJS), I don't get to see the template at all (just the header and buttons of GrapeJS). There is no error logged by node, but Firefox's Javascript does complain with a simple

XML Parsing Error: mismatched tag. Expected: </br>.
Location: https://[redacted]/grapejs/editor?id=6&type=campaign
Line Number 16, Column 15:

In Chromium, the template partially renders inside the GrapeJS editor, I'm guessing up until the point of the mismatched XML.

Again, I'm not sure if there's anything Mailtrain can do about this, but I wanted to post the issue nevertheless, so people know what's going on.

witzig commented 7 years ago

It might be related to this issue. Try closing all tags, e.g. <mj-image src="..."></mj-image> instead of <mj-image src="..." />

If that doesn't solve the problem it'd be great if you could share your template. E-Mail me at git.witzig@icloud.com if you don't want to post it here.

bbbart commented 7 years ago

Thanks for your help. It looks like I'm already making progress by simply avoiding the use of <br> tags. I got that by combining your suggestion of closing tags and Firefox's complaint about expecting a </br> tag.

I'll come back here if I can't get it fixed.

Thanks!

bbbart commented 7 years ago

Got completely resolved by not using self-closing tags. Thank you!