I'm trying to build a simple HTML editor. I want to make a button that inserts html tags such as <b> around selected text in a nsscrollview or nstextview. I can set the contents of the scroll view to a string, but I can't determine if any text is selected or insert the tag at the location of the cursor.
Is there an easy way to insert text into an nstextvew or scroll view.
Thanks,