rewrite the bbcode and add a live preview in the fronted