Using jQuery, how can I create a text field that automatically adds a new line when inserting text when the cursor is near the end.
The width of the text box is dynamically done through CSS (for example, #myTextArea { width: 80%; }), so I can do nothing but count the characters in each line.
I do not need a solution other than JS, since the contents of the text field are ever viewed by JavaScript.
source
share