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

Rich Text Field to Render as HTML


So I have a Rich Text Field (Web_Text__c) and the goal is to paste HTML codes in there, save, press a view button and it displays it as HTML.  The purpose is for the user to view how their HTML Email will look like.   Also, I have 5 fields that will attach in the HTML code so all they have to do is to edit those fields to make changes.

Any way you guys can help me on this?  Is there a path to follow? 

Kindly advise

Thanks in advance
Nirmala  KuchiNirmala Kuchi
Hi Jon,

It can be easily acheived using Jquery like below:

<textarea id="inputTextArea">
    <h1>help text area</h1>

<div id='viewMode'>   

Onclick of View button, execute following script:

- hide text area
- update div content using below script

Hope this helps!