Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJs textarea multiline issue

Tags:

textarea

extjs

How can I assign text containing \r\n to an ExtJs textarea and get to see line breaks instead of the actual \r\n characters? When I manually press the Enter key and check Firebug, I can see \r\n getting inserted. But if I assign a string containing \r\n to the textarea, it renders as-is.

Any hints would be helpful.

like image 564
aliensurfer Avatar asked Jun 15 '10 09:06

aliensurfer


1 Answers

I solved it myself. I was using the 'html' property to assign the \r\n-riddled text to the textarea. I changed that to 'value', and it works like a charm. Thanks anyway.

like image 82
aliensurfer Avatar answered Nov 15 '22 09:11

aliensurfer