in an effort to enforce tokens for a specific email template I removed the mkteditable sections of the div; but now those sections don't appear in the text version of the email... did I go about this the wrong way? is there a work-around?
Hi JD,
Justin Cooperman​ may have more details, but my understanding is that the mktEditable section work for both the HTML and Text version. If you remove them, they are removed from both versions of the email.
But if you want to enforce the token, why would not your token work for the text version ?
-Greg
I'm enforcing the use of tokens by removing the ability to edit the content at the asset level... unfortunate side-effect is the inability to update the text version.
Yes. The only solution is to use tokens on both version.
Pay attention to rich text tokens used in text versions, I remember someone in the community writing about all the HTML text being displayed in the text.
-Greg
That's correct! I put in a backup text token instead of the normal rich text token when doing the text-only version of the email. Just keep it to one sentence so you don't have line breaks. Rich text tokens spit out the actual HTML in the text-only versions.
Edward
Yah - I think I was a part of that conversation where the code appears in text versions -- very annoying!
Well the Text Only version of the email only prints out the editable areas. So you probably shouldn't have any text on your template anyway. I had a play with this and the best I came up with was calling the editable area 'DO NOT EDIT'.
The simplified code below shows how you can take advantage of the Text Only restrictions. Use 2 tokens for html & text only content. No need to go in and edit the email as the Text Only token is display: none within the html email 😉
`<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<div>
{{my.Content_Html:default=CONTENT_HTML}}
<div class="mktEditable" id="DO NOT EDIT" style="position:0;display:none;overflow:hidden;height:0;width:0;font-size:1px;color:#fff;">{{my.Content_TextOnly:default=CONTENT_TEXTONLY}}</div>
</div>
</body>
</html>`
Styles a bit hacky to hide the text only token in Gmail and Yahoo mail.
A
That's pretty interesting, actually. So that locks down the HTML copy and, if someone tried to edit anything, they would only be able to edit the text version, since anything they add to the html copy wouldn't be seen because the div is hidden...?
I ran that code through Litmus. Tweaked a few inline styles. Gmail and Yahoo mail in my first version displayed the Text Only code. Gmail removed the display none and changed height to min-height. In my second attempt I added position:0 & color:white as super safe fallbacks (not sure if any of the email clients actually needed them). I also added font-size:1px and width:0. Gmail and Yahoo might drop the display:none, but these additions keep the text from showing.
1. my.Content_Html is outside the editable area and cannot be modified accept through the token. It is also not used in the text only version.
2. my.Content_TextOnly is within the editable area and therefore shows up in the text only version. It is hidden from the HTML version with inline styles.
If someone did go in and edit the area marked DO NOT EDIT, nothing would show up in the HTML version. The Text only version is still vulnerable to change, but it should be clear to them that they are doing something wrong. Any damage they do would be no greater than what they could do with the token anyway.
A