Wrapping forum tags around selected text?

When i create a new thread or add a post and i want to bold text or something i select the text and press the button and it wraps the forum bold tags around it. How is this done?

Brendan.