Escape Kit
  • Blog
  • Contact

Salesforce & HTML Email Templates & Editable Regions... oh my.

9/2/2014

11 Comments

 
So yeah, when creating a HTML email template in SFDC we only really have two options, Batman or Robin. 

Batman) Create a header template that looks snazzy and has an editable region below it... which is guarded closely by the worlds most unimaginative WYSIWYG editor.

Robin) Create a custom email template with no header that you are free to style as you please but has no editable regions. 

What we need is for Batman and Robin to work as a team. We want a snazzy HTML email template PoW! that has predefined styling throughout BaM! AND editable regions BooM! 

Huge and basically unsolved problem... 

Problem solved, and it's fairly easy. 

So to get away from WYSIWYG hell we are going to choose to Create a custom HTML template with no header. 

Once there, name your stuff or whatever and paste your super fancy HTML email template code. 

All you do now is add contenteditable="true" to the td areas you want to be editable, see example below. 
contenteditable=
Now each <td> tag you add that too will show up as an editable box for the user when they select that template to send an email. And the best part is, all the styling tied to each one stays intact so it looks Snazzy!


Robin: "Where'd you get a live fish, Batman?" 

Batman: "The true crimefighter always carries everything he needs in his utility belt, Robin."


11 Comments
Luke
9/18/2014 03:20:00 am

This is awesome, and a brilliant work around. However, i'm realizing that when edits are made in the send email screen, they don't hold when the email is sent. It reverts back to the standard content in the email template. it looks like you're sending the template with modified content, however, those edits are wiped out in transit as sf.com defers to the templated version or your text. Could I be doing something wrong?

Reply
Kathi link
5/21/2015 05:38:26 am

This code works great! Thanks for the tip.

However, once I edit the text hit send, the email doesn't arrive with the edits made. Strips them out completely and reverts to the saved template. Any way to fix this?

Thanks,
Kathi

Reply
Steve
6/30/2015 09:22:56 pm

I concur - This does not work!!

Yes, it allows you to edit sections in the email preview screen, but when the email is sent all those edits are stripped out.

Reply
Victoria Mette link
7/12/2016 06:51:33 am

Nope, not working for me either. Yes - you can write new text. But no - this text will not be sent to the recipient

Reply
Dave Roberts 4 link
8/18/2016 07:09:58 am

Fell for it, too!
Nice effort.

Reply
Dave Roberts 4 link
8/18/2016 07:10:09 am

Fell for it, too!
Nice effort.

Reply
Dave Roberts 4 link
8/18/2016 07:10:16 am

Fell for it, too!
Nice effort.

Reply
Jay
5/31/2017 04:01:07 am

I found this free app to do the job for me - https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000E1lGQUAZ

Reply
mlefevre link
3/28/2020 10:31:18 am

Je souhaite partager avec vous cette activité pédagogique à mettre en œuvre chez vous et très amusante, qui permet aussi de dédramatiser un petit peu la crise.

C'est plutôt pour les ados, c'est un Escape Game en kit qui est à imprimer sur le thème du covid-19 : https://escape-games.net/index.php/coronavirus/

Un moment super sympa à passer !

Reply
mailerstock link
12/7/2020 11:01:45 pm

Browse our effective <a href="https://www.mailerstock.com/professional-email-template">professional email templates</a> examples. Choose industry-specific eye-catchy business newsletter samples and email marketing templates. For more information visit at mailerstock

Reply
Katie H link
5/20/2020 01:01:39 am

Hi, thanks for sharing this amazing code. It was very useful!!

Reply



Leave a Reply.

    Archives

    September 2014
    August 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    November 2013
    April 2013
    March 2013
    February 2013
    January 2013

    RSS Feed