PDA

View Full Version : Can't use "ENTER" to make a break in textarea (In toolbar)?



Kadifo
15 Sep 2010, 5:17 AM
Hi experts,

I'm (still) new to Extjs and trying to twist it to satisfy my needs as I love the system!

I have this toolbar:



new Ext.Toolbar({
renderTo: toolbar,
id: 'mainMenu',
items: [
{
xtype: 'tbbutton',
icon: 'gfx/icons/email.png' ,
text: 'Send mail',
menu: [
{
xtype: 'panel',
html: '<div style="padding:10px;overflow:auto;"><form method="post" name="mail"><table><tbody><tr><td>Subject</td><td><input name="subject" type="text" style="width:600px;"></td></tr><tr><td valign="top">Message</td><td><textarea name="msg" style="width:600px;height:200px;"></textarea></td></tr><tr><td> </td><td><input name="mail" type="submit" value="Send" class="btn"></td></tr></table></div>'
}]
}]
});

});


This is simply a toolbar with a "Send mail" function that pops down some HTML whenever you press it. It works fine, expect that I can't use "ENTER" to make a break in the textarea, how come? This works fine everywhere so I guess it is something with toolbar?

Please help!

darthwes
15 Sep 2010, 6:42 AM
\n is not <br />

See this thread (http://www.sencha.com/forum/showthread.php?109769-How-catch-(and-replace)-carriage-returns-in-a-Ext.form.TextArea-value&p=513443#post513443).