Hey guys I want to be able to select some text in a text area and then add something before and after it, I can do the adding part but how would I get the selected text?

Thanks in advance