If you're capturing the input as the user is writing the post, e.g. to save a draft, then what you have above is fine and should work.
If you mean capturing the Markdown after the form has been submitted then you need to remove the call to convertToHtml()
. The WMD editor converts the Markdown on the fly and submits this in the form for some reason (doesn't seem all that useful if you want to be able to edit the Markdown later).
The call is around line 1200 in the file wmd.js. Either delete or comment the convertToHtml()
line.
edit: looks like there is a better way to do this: Using wmd-new to submit markdown