问题
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