I don't have the smarts to build my own Markdown editor into the post form but wondered if there was a ready-made solution I could use. Sure enough, I found SimpleMDE - a "drop-in JavaScript textarea replacement" which you can call remotely from JsDelivr rather than installing it yourself. Just as well as my host doesn't support node.js.

Post in Markdown

It doesn't play very nicely with mobile browsers, which is a shame, so I've had to add a check against the user agent. I've also gone to town on resizing and styling parts of it to make it fit (and display) better.

Because it just replaces the textarea I don't have to do anything different to grab the contents, it just submits the form exactly as before. Pretty cool!

I may post more from the Mac just because of this.

Leave a Reply

Your email address will not be published.