Textarea word wrap only on line breaks
html, line-breaks, overflow, textarea, whitespace
Solution
As andi pointed out, the answer is here: HTML Textarea horizontal scroll
<textarea wrap="off"></textarea>
Problem
So, I have a textarea that is filled with text from the DB for the user to edit. The text from the DB contains line breaks in it (\r\n). I would the textarea to only line wrap on line breaks. I've messed around with different `white-space` attributes, but none seem to work. Right now, I have: ``` textarea { width: 60em; height: 40em; white-space: pre-line; overflow: auto; } ``` It does break on the line breaks, BUT ALSO breaks when the text on a line goes longer than 60em. How do I get it to only break on line breaks?