Using wmd-new to submit markdown

半世苍凉 提交于 2019-12-13 20:29:40

问题


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:


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>


来源:https://stackoverflow.com/questions/6172089/using-wmd-new-to-submit-markdown

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!