This is similar in many ways to MarkItUp ( http://markitup.jaysalvat.com/ ), which I've had good experiences with. One potential pitfall with JavaScript preview of Markdown (or Textile, or any other similar language) is that if you're not using the same script to transform the content at the server side, the final output can contain subtle differences. Not all implementations are precisely equal. If differences do oc…
I used to use MarkItUp but eventually moved away from markdown altogether. I found I had to keep tweaking the parser to allow stuff like inline, floated images, code blocks with language-tagging (for syntax highlighting) and so on. It came to be more work than just using a WYSIWYG editor.
Code blocks with syntax highlighting is super easy to implement. Styling images should be done with CSS, no? Also, you can add HTML in Markdown so you could easily just do: