Using wmd-new to submit markdown

2019-09-03 19:34发布

Does anyone use the wmd-new editor posted on google code?

I've installed the editor and got it to work correctly. I thought the editor would submit raw markdown. To my surprise it submits HTML. This is a problem because I need to store a markdown version of the text.

Another issue is, if there's a validation error, the form will reload with HTML instead of the original markdown. This would puzzle users unfamiliar with HTML.

Any ideas how to get it to submit raw markdown, or HTML and markdown?

1条回答
闹够了就滚
2楼-- · 2019-09-03 20:11

Per this answer, the option can be set below the text area using the following script:

<script type="text/javascript">

    wmd_options = {
        output: "Markdown"
    };

</script>
查看更多
登录 后发表回答