Reputation: 3469
I'm trying to fetch HTML/Text from a DIV and place it as-is (newlines and all) in a textarea. Seems simple enough, however IE7 is deciding to strip the newlines.
Here is my fiddle http://jsfiddle.net/qU29k/1/ - it should work correct on other browsers but IE7 will place all the text on a single line. This happens when using both .html() and .text(). I've also tried replacing \n's with \r\n's as per: .html() wont show newlines in IE but that was a no-go either.
Any ideas how this can be remedied?
Upvotes: 1
Views: 120
Reputation: 3469
I resolved the issue by changing the div to a textarea.
Here is the updated fiddle: http://jsfiddle.net/qU29k/7/
Upvotes: 1