I would like to know how to produce some code that would encapsulate a selection with tags. E.g. If i wanted bold text i would press a button and it would have <b>whatever_text</b>.
I know there are quite a few text editors out there but i would prefer not to use them. I would rather use a tutorial or a basis of code to start from.