Sergey
Sergey

Reputation: 963

Ext.Editor how to select text

I have Ext.Editor and have some onClick event that's begin to edit it, I need select all text in editor before edit

var elem = new Ext.Editor(new Ext.form.TextField({
    allowBlank : false,
    blankText : 'required',
    maxLength : 22,
    width : 111
    }), {
    alignment : 'tl-tl',
    completeOnEnter : true,
    parentEl : selNode
});
elem.startEdit(selNode.ui.getAnchor(), selNode.text);

tried elem.focus(true,10); and many other ... not working

Upvotes: 0

Views: 1249

Answers (1)

Evan Trimboli
Evan Trimboli

Reputation: 30082

You can use the selectText method:

http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.form.TextField-method-selectText

Upvotes: 1

Related Questions