View Full Version : textfield selected text
31 Aug 2012, 3:28 AM
How to get the selected text in a textfield or textarea ?
31 Aug 2012, 3:32 AM
i guess you want to get value for your textfield/textarea.
31 Aug 2012, 3:33 AM
I think he needs following functionality:
(http://www.sencha.com/forum/showthread.php?83407-TextField-Manipulating-the-selection-and-getting-the-selected-text-in-ExtJS-2)This post is a bit old but you can override it to Ext4.
31 Aug 2012, 6:34 AM
I have already test this thread. But I have always null value returned.
dom.id is the id of my textfield
If you have another idea ...
31 Aug 2012, 7:42 AM
In Ext4 you can get http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.TextArea dom element by:
var domElement = this.inputEl.dom; Then you can get selection range by
I didnt test IE part but it could be pretty simple
Powered by vBulletin® Version 4.1.5 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.