preview with marked.js ported to client side