How do you store the markdown using WMD in ASP.NET?

后端 未结 2 1810
天涯浪人
天涯浪人 2020-12-14 23:21

I have implemented the WMD control that Stack Overflow uses into a project of mine, it almost works like a charm, but when I save the changes to the databas

2条回答
  •  余生分开走
    2020-12-14 23:44

    If you're using the new WMD from http://code.google.com/p/wmd-new/, open wmd.js and add this line:

    wmd.wmd_env.output = 'markdown';
    

    Excerpt:

    ...
    wmd.ieCachedRange = null; // cached textarea selection
    wmd.ieRetardedClick = false; // flag
    
    wmd.wmd_env.output = 'markdown'; // force markdown output
    
    // Returns true if the DOM element is visible, false if it's hidden.
    // Checks if display is anything other than none.
    util.isVisible = function (elem) {
    ...
    

    That should do the trick.

提交回复
热议问题