I have textarea and i want, when i post the form if there are any new lines in the text area to get them and output the text with them, like the wysiwyg editors does.
What can’t you understand
I have form and i want to get te text area value on post SO IF THERE ARE NEW LINES IN THE VALUE OF THE TEXT AREA I WANT WHEN I OUTPUT THE TEXT THAT THE FORM GETED THOSE NEW LINES TO BE DISPLAYED AS ACTUALY NEW LINES LIKE THE WYSIWYG EDITORS>
Line breaks are interpreted as
\n.With javascript you can use regular expression to detect the new line character.
regex:
UPDATE:
this will replace the new line in textarea with
<br>tag to make a new line