What i want is:
I have a textarea. When user selects some text and presses a button "[smth]" is added to the begin and end of selected text. How can i do this? It must work on all browsers.
The same thing makes daniweb when you format a text (post).