You need to sign in to do that
Don't have an account?
tf_ianr
Convert carriage returns to html line-breaks in a long text field
If I'm binding a text field into a VisualForce page, whats a good way to convert the carriage returns in the text-field into HTML <br/> tags?
I can think of a few ways of doing it, but I'm wondering what the neatest way is.
This question is also at StackOverflow (with a bounty!) if you want to earn some StackOverflow points:
http://stackoverflow.com/questions/2525707/visualforce-convert-carriage-returns-to-html-line-breaks-in-a-long-text-field
I can think of a few ways of doing it, but I'm wondering what the neatest way is.
This question is also at StackOverflow (with a bounty!) if you want to earn some StackOverflow points:
http://stackoverflow.com/questions/2525707/visualforce-convert-carriage-returns-to-html-line-breaks-in-a-long-text-field
I eventually solved this by writing a load of code.
See my answer at StackOverflow for details.
All Answers
Try this:
<apex:outputField value="{!case.Description}"/>
I tried this and I couldn't get it to work.
When case.Description contains carriage returns, apex: outputField does not maintain the formatting.
I eventually solved this by writing a load of code.
See my answer at StackOverflow for details.