WMD is fantastic, but John Fraser vanished from the net shortly after making WMD’s initial code open source. His initial release was an obfuscated form, which makes it hard to deal with. He had plans to go ahead with a more developer friendly and advanced version of his editor, but it never happened. I have no idea what might have happened to John, but I suspect it was not good (active programmers don’t typically disappear off the net entirely for years at a time without a trace). I do hope John is well, but the internet is a much poorer place without him I can tell you that!
MarkItUp! is also a fine editor in its own way, but it was not designed with Markdown as the primary target and it isn’t exactly a WYSIWYG editor. Technically, MarkItUp! is just a markup editor with some macros on the toolbar. It does have support for the markdown syntax, and it does a decent job as a markup editor even with markdown’s syntax. But using it to author content in markdown isn’t very approachable for a public facing application. The editor is just a tad too “bare-metal”.
WMD on the other hand is smoother and more viable. It is also more of a markup editor than a real WYSIWYG, but it does has some really subtle, but important features that help make authoring markdown content enjoyable. But John’s baseline version has several pretty major problems, and since the source is obfuscated, fixing it up and customizing it is next to impossible.
There are quite a few branches from the SO version floating around on github. Fortunately there IS one branch that seems to have worked out most of the major problems and has actually advanced WMD quite a ways beyond the initial SO version. Anand Chitipothu maintains the openlibrary branch of WMD.
Overall, this is an excellent variant that can be used simply in just about any web application. It even has decent documentation too!
I’m using openlibrary / wmd Master branch tagged as 2.0, but there are a couple of minor catches I’ve found in this variant (as it was on July 1st 2010 anyway):
First, there is a random stray undeclared variable that blows up in chrome (I didn’t check other browsers for this one).
The line with the problem is:
WMDEditor.Checks = Checks;
Commenting out this line fixes the problem simply enough.
The other problem is much more complex. Basically, when putting this together, Anand made some fundamental changes to how the code is arranged, and some of the stuff in an IE specific branch hasn’t been property updated with the new object model yet (the author probably isn’t testing in IE 8 yet). Fixing this is rather annoying to describe, but the simplest way to do it is:
- do a search/replace for “wmd.ieCachedRange” and replace with “WMDEditor.ieCachedRange”
- do a search/replace for “wmd.ieRetardedClick” and replace with “WMDEditor.ieRetardedClick”
I have to say that I’m not fully up-to-speed on the innards of WMD, so my fix may not be optimal here… but it seems to work OK in my limited usages so far.