PDA

View Full Version : virtualkeybord and textarea



tdikarim
2 May 2013, 2:31 AM
Hi all,

[ext 4.1.1]

I used VirtualKeyboard plugin. it work fine for textfield.
But with textarea, each key is set with a newline.


myTextArea.setValue(myTextArea.getValue() + keyValue);

I have try for test


myTextArea.setValue(myTextArea.getValue() + 'A');

and same result

How to fix that ?

Thanks for your help

slemmon
3 May 2013, 7:48 PM
I'm not able to reproduce the issue you're describing using the below code (in 4.1.1 or 4.2):



var form = Ext.create('Ext.form.FormPanel', {
title : 'Sample TextArea',
width : 400,
bodyPadding: 10,
renderTo : Ext.getBody(),
items: [{
xtype : 'textareafield',
grow : true,
name : 'message',
fieldLabel: 'Message',
anchor : '100%'
}]
});


Ext.widget('button', {
renderTo: Ext.getBody(),
text: 'Set Value + \'A\'',
handler: function () {
var textArea = form.down('textarea');
textArea.setValue(textArea.getValue() + 'A');
}
});

tdikarim
6 May 2013, 7:33 AM
Hi,

Sorry my field is an TinyMCEEditor
And I combine the tyniMCE with the virtualKeyboard plugins.

Maybe does exist other solution in pure extjs.

If you have a suggestion...

Thanks

slemmon
6 May 2013, 5:32 PM
While we don't support the TinyMCEEditor you might have a look at:
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.form.field.HtmlEditor

But, I'm not familiar with the virtualKeyboard plugin I'm afraid.

tdikarim
7 May 2013, 6:10 AM
Thanks slemmon,

I will use HtmlEditor and add the button that i have need ...