You need to sign in to do that
Don't have an account?

Displaying Text Unformatted
I have a VF page that displays data from a database with a field Long Text Area. The data in the field has formatting that I would like to preserve mostly new lines. I tried to use <pre> but, the text will go off the side of the page almost like the new lines are removed?
Is there a way to display this text as entered into the DB field (Long Text Area)? I need to display the data as it is entered into the field with new lines and space.
If I change the field type to Rich Text Area will that help? I have other fields that are Rich Text Area and I seem to get <br> that do not break and only display as <br> is there a way to make the <br> actually break?
Thanks.
Have you tried <apex:outputField value="Object.Field__c/>.
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_outputField.htm
You will have more success in cleanly formatting your data if you use <apex:outputField> <apex:inputField> for your data if possible.
That is not always the case, but if you can I would suggest using those tags.
<apex:outputField value="Object.Field__c/> is giving me the same results. I am attempting to preserve the format in the field with are mostly new lines. Are new lines removed before displaying? If so how do I preserve newlines coming from a DB field?
Display DB text as is (with new lines) use HTML tag <pre>