View Full Version : Add Text to the current cursor-position in a textarea

18 May 2011, 12:11 AM
Hi, I googled about hour and nothing... Please help me I have code:

fieldLabel : scaffoldPanel.labels['oki[text]'],
name : 'oki[text]',
id : 'txt',
xtype : 'textarea',
allowBlank : false,
blankText : "Enter at least something",
height : 160

{ xtype: 'button',
text: 'Change Text',
handler: function(){
Ext.Msg.prompt('Enter Text', 'Enter new text for Action 1:', function(btn, text){
if (btn == 'ok' && text) {
var textz = 'Hi' + text;

How to do:

If I Click on button appears field where i can paste something, and this data will paste into my TEXTAREA. how to paste data from this input from messagebox into textarea?

Thank you

19 May 2011, 11:01 AM
You need to try insertAt .... i believe that is what you are looking for ... I have the code somewhere that works ... if you need it - let me know.