It is actually quite simple as long as you force users to type tags as well.
If you force user to type something like this to your input form:
<b>This is bold</b> and this is not.
and use the following code:
var text = $("#input-text").val();
$("#output-element").html(text);
Then tag will be formatted as html tag and you will see bold text instead of < b > in the output element. This works for all the possible tags as well.
fiddle: http://jsfiddle.net/AKykp/