Javascript to convert Markdown/Textile to HTML (and, ideally, back to Markdown/Textile)
- by Horace Loeb
There are several good Javascript editors for Markdown / Textile (e.g.: http://attacklab.net/showdown/, the one I'm using right now), but all I need is a Javascript function that converts a string from Markdown / Textile - HTML and back.
What's the best way to do this? (Ideally it would be jQuery-friendly -- e.g., $("#editor").markdown_to_html())
Edit: Another way to put it is that I'm looking for a Javascript implementation of Rails' textilize() and markdown() text helpers