As it turns out, Stack Overflow have kindly released their editor into the public domain, as PageDown. MuzHack, on the other hand, was in need of a Markdown editor with live preview, so I decided to fork PageDown on GitHub and create my own version for this purpose.
After a couple of days of intensive hacking, I was able to mould PageDown into a version that integrates well with MuzHack and functions well enough that it made it into a new MuzHack release! There are probably bugs lurking, but I haven’t discovered them through my own testing, so I decided it was better to make available the new and improved experience over the old preview-less Ace editor.
Among the more noticeable changes compared to the original PageDown, I’ve converted the formatting icons into vector fonts rather than the original bitmaps. The rest of MuzHack uses icon fonts anyway, so it might as well hold true for the editor too. Plus, they’re easier to work with than bitmaps. I will probably keep reworking PageDown, in order to simplify the codebase (it’s pretty messy at the moment) and improve the editing experience, as work on MuzHack progresses.
So far, I can tell that the project editing experience in MuzHack has improved greatly. It feels so much better to have an instant preview while writing the Markdown as opposed to having to wait until changes have been saved. It might also save you from unintentionally publishing revisions with errors, and having to re-publish due to this. Feedback was favourable from showing live preview functionality during the recent presentation of MuzHack at the Norwegian Notam centre.