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
VidhiVidhi 

New Line Issue on Vfpage

kiranmutturukiranmutturu
can u show me how the string was constructed with new lines?
harsha__charsha__c

Form the string as followed.

 

String str = 'first line \n second line \n third line';

 

AdrianCCAdrianCC

Hello Vidhi,

 

Try to add richText="true" to the apex:inputTextArea. 

<apex:inputTextArea richText="true" ..../>

 

Also try to replace \n with <br/>. Maybe it works like so.

 

Hope this helps,

Adrian

360venky360venky

Thank this works for me

AdrianCCAdrianCC

To clarify... which solution works, mine or @hasha_trekbin's?

 

Thanks,

Adrian