check the live preview on reply posting on www.stackoverflow.com - seems to support textile to a degree - as well as html / code etc. rather nice, but its a mix of native js and jquery.
good luck - use http://jsbeautifier.org/ to look at their minified sources. -- Dimitar Christoff <[email protected]> - http://fragged.org/
