I wasn't sure if there was going to be a muse-letter again this week but I've managed to get about two-thirds of the way through even if the majority of that is a complete tangent.

It's been hard to focus lately but having the 'post form' at the top of the blog is definitely a good way to nag myself into writing something even if it isn't here. I need to get into a regular habit again.

27/08/2020, 16:30
# Comments

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.


Going through the issues for SimpleMDE it doesn't appear to be mobile browsers that have an issue but certain Android keyboards such as GBoard - the one I happen to use.

Update: if I switch to Desktop View on my phone it all works normally so it must be something to do with mobile view.