javascript - Textarea automatic line break -
i have textarea on site want paste urls.
is possible create line break every time paste url? if not, can create line break when enter space?
i've searched solution found solution create line breaks after form submit didn't me.
fiddle here: https://jsfiddle.net/3sj2644z/
this.value = this.value + "\n";
you listen paste event on textarea , grab text in , append linebreak escape character \n , place new string value textarea.
you don't use html in textarea br tag doesn't work if think so.
Comments
Post a Comment