Add linebreak with jQuery at end of each textarea row
Posted
by
lpetren
on Stack Overflow
See other posts from Stack Overflow
or by lpetren
Published on 2012-06-02T10:28:42Z
Indexed on
2012/06/02
10:41 UTC
Read the original article
Hit count: 209
So I have been googleing around for a couple of days but I have not found a solution so far, so I'm turning to you guys with hope that there even is a possible solution for this.
I need to, at the end of each line in a textarea add a linebreak before it is sent to PHP. That is, even if the user does not press enter but if a word get's cut of or it just jumps down a row because it has filled the with of the textarea. And I need to do so with jQuery or Javascript.
Does anyone have any good ideas on how to do so?
Thanks!
© Stack Overflow or respective owner