I've created a very functional template that has 37 modules and though most of the tests work fine for some reason while editing/creating new emails using the template, sometimes content gets duplicated and the editable sections become un-editable unless I delete them from the "Edit Code" window which then results in even weirder results. I've had this issue of content duplication on other templates before but very occasionally, is there a reason why this could happen? is it because there are a lot of modules on the template that the JS on the email editor gets corrupted? This is very annoying and it's very important for us to get this template running without any errors.
For reference, the email is this one:
Common issues that will cause it to break:
Hi again Angel,
I gave a look at your code and it seems pretty clean.
I detected that module id="col-1-module" has the Mktoaddbydefault set twice.
Also, you should use mktoText rather than mktEditable, and I am not sure that setting them on <span> tags it a good idea. Use <div< instead. For images, use the mktoImg on a <div> too. mktEditable is inherited from v1 templates and is only there for backward compatibility.
Agree with Greg's comments. Did removing the extra mktoaddbydefault solve this for you? I also would agree mktoText on <div> is the optimal way to define the editable text region for best results.
Oh, thanks for checking Grégoire!
The reason why I'm using <span> instead of a <div> is because I want to avoid defining display: inline on those elements since divs will always break into a new line.
I did not know mktoEditable was deprecated but the reason we are using them is because it's easier for our team to edit content with a full WYIWG rather than the image browser but I guess the mktoText will do the trick.
Thanks again, I'll try those changes and let you know.
mktEditable and mktoText are equivalent. Both will give users the TinyMCE rich-text editor to have full editing functionality.