I chose MarkdownDeep after reviewing the multiple Markdown C# and JavaScript APIs currently available (for more details see the references section at the end of this post)
My first step was to go NuGet and choose the MarkDownDeep - .NET Only Edition package:
Which just adds the MarkdownDeep.dll to the solution:
One important note to mention at this stage, is that I also have opened in another instance of VisualStudio, the MarkdownDeep example described in the blog post Adding Markdown Support to ASP.NET MVC projects with MarkdownDeep and NuGet:
Back in TM's VisualStudio process, and based on the example provided in that MarkdownDeep demo app (shown above), I added a variation the HtmlHelper Extension Method to TM’s App_Code folder (shown below):
... modified the index.cshtml to consume this extension method and display the Markdown transformation as Raw Html :
... added some markdown text to the controller:
.. and that's it :)
The Markdown transformation PoC is complete
Here is what it looks like:
For reference here is the source markdown side-by-side with its transformation:
MarkdownDeep References:
- https://github.com/toptensoftware/markdowndeep
- http://www.toptensoftware.com/markdowndeep
- http://blog.dantup.com/2011/05/extending-markdownhelper-markdowndeep-net-to-support-google-codes-prettify-syntax-highlighter
- http://www.benswayne.com/improving-markdowndeep-jquery-editor-markup
- http://stackoverflow.com/questions/9002132/possible-to-extend-markdowndeep-markdowndeepeditor-in-an-easy-way
- http://www.toptensoftware.com/Articles/66/Adding-Markdown-Support-to-ASP-NET-MVC-projects-with-MarkdownDeep-and-NuGet
- http://www.kieransenior.co.uk/2012/06/rendering-a-markdown-view-in-asp.net-mvc-3/
- http://nuget.org/packages/MarkdownDeep.Full/