1

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?

1 Answer 1

1

I resolved the issue by changing the div to a textarea.

Here is the updated fiddle: http://jsfiddle.net/qU29k/7/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.