<textarea id="ta" rows="10" cols="50"></textarea><br />
<input type="submit" value="Жырный" onclick="document.getElementById('ta').value+='[B]';document.getElementById('ta').focus();" />
<input type="submit" value="Курсивный" onclick="document.getElementById('ta').value+='[I]';document.getElementById('ta').focus();" />