Client side html markdown conversion

The currently accepted answer actually tells you to do it on the server-side.

To really do client-side conversion, you could try one of these libraries (in order of popularity, measured by GitHub stars):

  • marked
  • showdown
  • markdown-it
  • markdown-js
  • reMarked.js

feel free to try my lib, reMarked.js, for client-side html/DOM > markdown

https://github.com/leeoniya/reMarked.js

the other way around you can try marked, but be aware that it doesn't support some php-markdown-extra features, like parsing pretty tables http://michelf.ca/projects/php-markdown/extra/#table

https://github.com/chjj/marked/


Why don't you use WMD-Editor? It has the ability to preview the html.