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
soni rajputsoni rajput 

Problem in Rich Text Area

Hi,

 

I am using Standard Rich Text Area. I am directy pasting the following code in text area

<img src="http://www.techgoondu.com/wp-content/uploads/2010/12/salesforce_logo.jpg" />

 

The problem is that when i am displaying rich Text field's value through <Apex:outfield> image not get displayed.

So how can i display image by directly inserting code in Rich Text Area field?

 

Thanks,

Soni

 

 

bvramkumarbvramkumar

That is because when you copy paste some thing into RTA, It does not treat it as direct html whereas you are expecting that it should be taken html content. When you copy/paste, it actually encodes the text into html in backend. 

 

Try doing this,

When you bind RTA field using outputfield you will find an Icon in it's tool bar to insert image. When you click that Icon, it opens a  popup where you can enter the url in the"Web Address" Tab. Notice that the Image pasted properly. Now you save the record and run an SOQL to see the content of the field of that record. And that is actually how your content should be saved when copy/paste.