You need to sign in to do that
Don't have an account?
uHaveOptions
Rich Text Field to Render as HTML
Hello
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
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
It can be easily acheived using Jquery like below:
<textarea id="inputTextArea">
<h1>help text area</h1>
</textarea>
<div id='viewMode'>
</div>
Onclick of View button, execute following script:
- hide text area
- update div content using below script
$('#viewMode').html($('#inputTextArea').text());
Hope this helps!
Thanks,
Nirmala