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

Retain formatting on Visualforce page
Dear All,
I have a custom field 'Action'. It is a Long Text Area type of field. When i try to bring this field on to the visualforce page then it does not retain formatting like line spacing, line breaks etc.. Below mentioned is the code, please let me know how formatting can be retained on visualforce page as well.
'</br>*****<h1>POS</h1>*****' +
'</br></br>' +
'<tr align="left"><b>POS Number: </b></tr>' + POS.Name + '</br></br>' +
'<tr align="left"><b>Created By: </b></tr>' + POS.CreatedBy.name + '</br></br>'+
'<tr align="left"><b>Is this the most recent POS? </b></tr>' + POS.Most_Recent_Record__c + '</br></br>'+
'<tr align="left"><b>Status: </b></tr>' + POS.Status__c + '</br></br>'+
'<tr align="left"><b>Action: </b></tr>' + '<div style="word-wrap:break-word; width:450px;"/>' + POS.Action__c + '</br>';
containerList.add(cc);
Date Entered in Salesforce.com

Formatting on Visualforce page is all broken

Thanks.
I have a custom field 'Action'. It is a Long Text Area type of field. When i try to bring this field on to the visualforce page then it does not retain formatting like line spacing, line breaks etc.. Below mentioned is the code, please let me know how formatting can be retained on visualforce page as well.
'</br>*****<h1>POS</h1>*****' +
'</br></br>' +
'<tr align="left"><b>POS Number: </b></tr>' + POS.Name + '</br></br>' +
'<tr align="left"><b>Created By: </b></tr>' + POS.CreatedBy.name + '</br></br>'+
'<tr align="left"><b>Is this the most recent POS? </b></tr>' + POS.Most_Recent_Record__c + '</br></br>'+
'<tr align="left"><b>Status: </b></tr>' + POS.Status__c + '</br></br>'+
'<tr align="left"><b>Action: </b></tr>' + '<div style="word-wrap:break-word; width:450px;"/>' + POS.Action__c + '</br>';
containerList.add(cc);
Date Entered in Salesforce.com
Formatting on Visualforce page is all broken
Thanks.
if that doesn't work you could also try the apex:outputtext and set escape to false