You need to sign in to do that
Don't have an account?
Rich Text Area fields do not display correctly in Visualforce email template
I have an email template that I built as a visualforce template because I need it to show related list info. ..a functionality not available in text and html templates. However, end users can't edit these and there is info that needs to change in each one.
So I created a Rich Text area field where users can change the template text on a couple sections. But when I use the field in my template, the formatted text shows up as a block of text with HTML format tags mixed in.
Ex. "EXAMPLE TEXT IN FIELD (please see below)"
Shows up as
"<b><u>EXAMPLE TEXT IN FIELD</ul></b> <font color=red>(please see below)</font>"
Is there anyway to keep the formatted text and have it show up correctly in the Visualforce template?
The formatting in this field is required because it's going to outside clients. Parts of the field are formatted differently which is why I'm trying to use the Rich Text Area field in the first place.
Please help!!
Hey
Are you using an outputText field? You'll need to set 'escape=false', but also be aware that getting an email template to look the same when viewed from different clients e.g. Yahoo, Gmail, Outlook etc is very difficult. In fact there are companies that make a living out of it e.g. http://mailchimp.com.
Wes
All Answers
Hey
Are you using an outputText field? You'll need to set 'escape=false', but also be aware that getting an email template to look the same when viewed from different clients e.g. Yahoo, Gmail, Outlook etc is very difficult. In fact there are companies that make a living out of it e.g. http://mailchimp.com.
Wes
OH That worked perfectly! I can't believe it was something so simple.
Thank you VERY VERY MUCH :-)
I'm having this problem inside salesforce itself. Our users enter formatted data into the RTA, click save, and the markup is displayed.
Do you have any idea what is going on?
I've reproduced it, but can't document the steps as I haven't figured out what exactly it was that tripped it...
hi All,
I have rich text field and i want to display the that field data in visaul force page.
i used <apex:outputText style="font-size:11px;" value="{!descr.Description_Language__c}:" escape="false"/> to display the RTF data but still it is displaying the RTF data on UI like '<span><p> this is desc. </p> </Span>' instead of 'this is desc.'
can any one please tell me the resolution , is it possible to do this in visual force/apex or if there are any other workaround which will remove these html tag either by using the java script tag or any other way.
I'm having similar problems with displaying a rich text field in an visualforce template. My code looks like this:
Visit_Result__c is a rich text field and people usually write their reports in word or excel and then paste it into this field and distribute it with an email template.
However, if I run a test with my little template it looks something like this:
<p><strong><span class="titleSeparatingColon"><font size="2">Visit Results:<br></font></span></strong><span class="titleSeparatingColon"><font size="2">1) Participants<span class="titleSeparatingColon">.... and so on.
I have tried your answer with my case, I want to display Text Area field value in a VF Email Template, But still I can see the entire field content displayed in single line. Am I missing anything here? Please help!
Thanks,
Prathibha