10

I'm just getting into Markdown and think it's the bee's knees. I'm working in ASP.NET (MVC) and am wondering if there are any good .NET libraries for Markdown, and am also curious how SO renders it on the fly. It must be a JavaScript library.

devios1
  • 36,899
  • 45
  • 162
  • 260

2 Answers2

4

StackOverflow uses Attacklab's WMD, a Markdown editor. It takes care of all the on-the-fly rendering. This is the relevant snippet of code in the StackOverflow page source that does the styling magic.

    var jWmd = $("#wmd-input");
    jWmd.not(".processed").TextAreaResizer();
    jWmd.typeWatch( { highlight:false, wait:5000, captureLength: 5, callback:styleCode } );
    jWmd.rules("add", { required: true, minlength: 10 });
John Feminella
  • 303,634
  • 46
  • 339
  • 357
0

WMD appears to be no longer active.

It has been replaced by a project called PageDown. It's available on StackOverflow's GitHub repository here: https://github.com/balpha/pagedown

See also the full list of SO projects: http://stackexchange.github.io/

Reference: https://meta.stackexchange.com/a/71825/134729

Community
  • 1
  • 1
Jon Schneider
  • 25,758
  • 23
  • 142
  • 170