You need to sign in to do that
Don't have an account?
ARUNBLIKESCLOUD
HTML inside Apex String
Folks,
I have an text area field on my Lead object and the field data is populated by a trigger. I want to highlight some part of the string in bold. e.g:
Trigger.new[i].Description = '<b>'+'This is a test'+'</b>';
But the above statement does not render the expected HTML text This is a test on the Description field. Rather the text is displayed with tags as such.
Any thoughts ?? Your help is highly appreciated.
If you are using this in an outputField in a VisualForce page, you can set the escape attribute to false to render the HTML. However, if you are using this in a standard page I don't think there is any way to achieve this. This kind of makes sense to me, as otherwise you could make the standard page render in rather strange ways, and potentially break it.
Bob,
Thanks for your response. Yes what I'm referring to is a standard page... I was just wondering if there would be a trickto hack this ... I hate to create an inline VF for this purpose alone.
Again, appreciate your response.