Adds helper method for getting selected text.