I'm trying to build a text searching tool just like the one you get when you press Cltr+F to find text on a web page and add my own custom tags to this text. earlier i was grabbing this text using getSelection() method which reutrns a range object so text lying in different elemets is easy to recoginse, What i want to know is, is there a way to get the same functionality for any text entered by the user. and then manipulate this text