+ Start a Discussion
HalcyonandonHalcyonandon 

No HTML allowed in custom object fields?

So I followed the blog tutorial for visualforce.  On posting information to the visualforce blog I made, I had noticed that html wasnt supported even though the tutorial used the YUI rich text editor.  Then on my own project, I'm at the point where html needs to be pulled from a custom object field and displayed on a visualforce page, except that html doesnt render.  It displays unformatted.

So my question is...  Is it at all possible to stored HTML in a custom object and use it in a visualforce page to control the formatting of content?

If this isnt possible, is there any alternative?

Update: I also tried using the rich text editor built into the inputTextArea, this saved the rich text as html in the field and did not render same as all previous attempts.



Message Edited by Halcyonandon on 04-25-2008 07:37 AM
mtbclimbermtbclimber
when you render the field value are you using the escape attribute on outputtext?

Code:
<apex:outputText value="{!myobject.myhtmlfield}" escape="false"/>

 

HalcyonandonHalcyonandon
Ah, you have to keep it in an outputText.... thanks