For e.g <h1 id="hellomarkdown">hello, markdown!</h1>
Will return back # Hello markdown
What is the use case of this?
Markdown is useful because it leaves the formatting/display up to the client. Example - you may be converting markdown to richtext to display within a mobile app, instead of displaying it as HTML as you would in a web app.
So a use case might be that you use a WYSIWYG editor to create HTML content via a web app. The content is then reverse converted to markdown and stored in the DB. When consumed/viewed, the same content is then either converted to HTML for display on web, or richtext for display in a mobile app (etc).
Check this post in our website:
http://showdownjs.com/#!/blog/annoucement-showdown-2.0
Was this already implemented and just hard to find? The repo description seems to indicate this functionality exists:
A bidirectional MD to HTML to MD converter written in Javascript
I just found it in tests. converter.makeMarkdown()
@tivie Is 2.0 out yet or when will it be? @OrkhanAlikhanov did you find that in tests but not available in source code?
converter.makeMarkdown()
Thanks
@jrmcdona It's available in master branch. See makeMarkdown
Most helpful comment
Markdown is useful because it leaves the formatting/display up to the client. Example - you may be converting markdown to richtext to display within a mobile app, instead of displaying it as HTML as you would in a web app.
So a use case might be that you use a WYSIWYG editor to create HTML content via a web app. The content is then reverse converted to markdown and stored in the DB. When consumed/viewed, the same content is then either converted to HTML for display on web, or richtext for display in a mobile app (etc).