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
jucuzoglujucuzoglu 

RTF Pages with HTML not displaying properly in VisualForce

I have some Rich Text Fields and instead of displaying the Rich Text they seem to be displaying the mark-up instead.

 

How do I properly display a Rich Text Field on a VisualForce page?

Best Answer chosen by Admin (Salesforce Developers) 
SurekaSureka

Hi,

 

To avoid displaying HTML Characters for rich text area field in VF page,

 

<apex:inputField value="{!account.RichTextarea__c}"/>     - This will automatically escape HTML characters.


<apex:outputText value="{!account.RichTextarea__c}" escape="false"/> - If you are using output text, you can use escape = false, to escape HTML characters.

 

Thanks

Sureka