PDA

View Full Version : Get selected text



Araberen
29 Nov 2011, 6:30 PM
Hi,

I want to know when users select text from any Ext.Element (a paragraph p for instance, or an h1 element, etc.) and then be able to access the selected text (and more)...

I tried the select event but it apparently works only for input elements. Also tried to use the selectable() method, but without success.

Any idea?

Araberen
29 Nov 2011, 8:14 PM
I found a way here :
http://www.phpied.com/replace-selected-text-firefox/
(http://www.phpied.com/replace-selected-text-firefox/)and with https://developer.mozilla.org/en/DOM/Selection


(https://developer.mozilla.org/en/DOM/Selection)