function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
raj161raj161 

Rich Text Area field on page layout

Hi,

I have a rich text area field on a VF page where a site user enter's the rich text in it.

When I add that field to a page layout I see all the data in html format. All the data entered by user is converted to html and is not in a readable format?

 

How can we see the data of richtextfield in a readable format on the salesforce standard pagelayout?

 

Thanks in advance

 

Raj

 

SurekaSureka

Hi,

 

I also faced a similar Issue. I used the below  method to remove the HTML Tags.

 

public String removeHTML(String htmlString)
 { 
 String noHTMLString = htmlString.replaceAll('\\<.*?\\>', ''); 
 noHTMLString = noHTMLString.replaceAll('\r', '<br/>'); 
noHTMLString = noHTMLString.replaceAll('\n', ' ');
noHTMLString = noHTMLString.replaceAll('\'', '&#39;');
 noHTMLString = noHTMLString.replaceAll('\"', '&quot;');

return noHTMLString;
}

 

Hope this solves. 

 

Thanks

 

raj161raj161

Thanks for your help.

 

Will check out this one.

 

Thanks