Skip to main content
added 2 characters in body; edited title
Source Link
Matt Lacey
  • 25.8k
  • 7
  • 68
  • 153

How to apply CSS styles to a VF field of type Rich text field in a Visualforce page

I have a Object 'A' with field 'testField1' and it has html formatted text value..

Something like this:

testField1 = "<div class="text">sample text </div><div class = "boldthis"> bold this text</div>"

testField1 = "<div class="text">sample text </div><div class = "boldthis"> bold this text</div>"

I have overriden the object detail page for object A with visualforce page and it has style attributes..so, so how do i apply these styles for the field "testField1" on the detail page?

I am trying to do with <apex:outputText value="{!A.testField1}"> but it is just printing raw html text?

How to apply CSS styles to a VF field of type Rich text

I have a Object 'A' with field 'testField1' and it has html formatted text value..

Something like this:

testField1 = "<div class="text">sample text </div><div class = "boldthis"> bold this text</div>"

I have overriden the object detail page for object A with visualforce page and it has style attributes..so how do i apply these styles for the field "testField1" on the detail page?

I am trying to do with <apex:outputText value="{!A.testField1}"> but it is just printing raw html text?

How to apply CSS styles to a Rich text field in a Visualforce page

I have a Object 'A' with field 'testField1' and it has html formatted text value..

Something like this:

testField1 = "<div class="text">sample text </div><div class = "boldthis"> bold this text</div>"

I have overriden the object detail page for object A with visualforce page and it has style attributes, so how do i apply these styles for the field "testField1" on the detail page?

I am trying to do with <apex:outputText value="{!A.testField1}"> but it is just printing raw html text?

edited title
Link
cropredy
  • 73.3k
  • 8
  • 128
  • 283

How to render the html text output ofapply CSS styles to a custom object variable?VF field of type Rich text

Source Link
javanoob
  • 9k
  • 15
  • 77
  • 143

How to render the html text output of a custom object variable?

I have a Object 'A' with field 'testField1' and it has html formatted text value..

Something like this:

testField1 = "<div class="text">sample text </div><div class = "boldthis"> bold this text</div>"

I have overriden the object detail page for object A with visualforce page and it has style attributes..so how do i apply these styles for the field "testField1" on the detail page?

I am trying to do with <apex:outputText value="{!A.testField1}"> but it is just printing raw html text?