Added function to get selected text (rather than html)