Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript Line Break Textarea

Tags:

javascript

I have a text area that I want to pre-populate with some specific text that includes line breaks. I'm populating the area onLoad but I can't get the line breaks to work correctly. Any advice on how to do that? Thanks.

like image 965
jcmitch Avatar asked Jan 09 '12 19:01

jcmitch


1 Answers

You need to replace line breaks with newline characters: \n

like image 50
Diodeus - James MacFarlane Avatar answered Sep 21 '22 15:09

Diodeus - James MacFarlane