Hey, i'm making a forum, and now the bbcode part. How can i make a button insert a certain string into a textarea right at where the cursor is when clicked? eg. when posting on this forum, when i click the B, it inserts "[ b ][ / b ]"(spaced because of bbcode) into this textarea. However, when this was inserted, the cursor ended up after "[/b]". How can i also make the cursor end up in between the [ b ] and [ / b ]?