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
deter danglerdeter dangler 

wordwrap css property for rich text fields?

I have a custom field "FieldOne" of type Rich Text Area on Custom Object and I am setting the value for this field in apex as below :
 
<p style="word-wrap:break-word;">aLongAnnoyingContinuousWordWithNoSpacesInBetweenThemIReallyWantToWrapThisUsingCSSWordWrapStylePropertyButItDoesnotWorkAndSimplyDisplaysAsOneContinuousLine</p>
But on the detail page of the Object, It just displays as a long continuous text and user has to scroll to the right to see the complete text.

When I inspected this element on the page using FireBug it shows that style attribute is empty for the <p> element..

Why is salesforce stripping the word-wrap property from the style attribute? or am I doing something wrong?
 
ShashankShashank (Salesforce Developers) 
As per this, "HTML code isn’t supported in the Salesforce HTML editor. HTML code is treated as text."

https://help.salesforce.com/apex/HTViewHelpDoc?id=fields_using_rich_text_area.htm&language=en_US