+ Start a Discussion

inputTextarea line breaks and spaces

I am using an inputTextarea for a custom outgoing email but my vf page cannot maintain line breaks or spaces. It seperates every word with one char long space regardless of how you indented your text.


e.g: I type:


 a     b



    e    f  '


I'll get:

'a b c d e f'




Best Answer chosen by Admin (Salesforce Developers) 

That is standard browser behaviour. They ignore repeated spaces / line breaks and just show one space. You may need to use the pre-formatted text <pre> tag in your page.