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 database it is saving the HTML version and not the Markdown version.
So where I have this in my text box:
**boldtext**
It is really saving this:
<b>boldtext</b>
How do I make it save the Markdown version?
Before you include wmd.js
, or whatever you've named the WMD editor JavaScript code locally, add one line of JavaScript code:
wmd_options = {"output": "Markdown"};
This will force the output of the editor to Markdown.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With