Is there any good Markdown Javascript library or control?

JavascriptControlsMarkdown

Javascript Problem Overview


I want to build a site where the user can enter text and format it in Markdown. The reason I'd like a Javascript solution is because I want to display a live preview, just like on StackOverflow.

My site is not targeted at developers, however, so an editor control would be ideal.

I gather that on StackOverflow, the WMD editor is being used.

A quick search on Google also turns up Showdown library, which I think is actually being used by WMD.

Are there any other options? Are WMD/Showdown great tools already? What have been your experiences with the different options?

Javascript Solutions


Solution 1 - Javascript

We've been pretty happy with WMD. There are a few niggling bugs in it, however. Nothing major, but I would love if John Fraser (the author) made the code open source so we can fix some of them. He's promised to do so but other real life projects are getting in the way.

I do follow up with John every week. I'll post on the blog once the WMD source is finally available. Haven't been able to contact John Fraser in over a year now.

We have open sourced both the JavaScript Markdown library

http://code.google.com/p/pagedown/

and the server-side C# Markdown library

http://code.google.com/p/markdownsharp/

Solution 2 - Javascript

If you're not averse to using Ajax to generate the live preview, then another option is markItUp!. markItUp! is a universal markup-editor, and very flexible. It does provide an easy way of creating a markup editor, but unlike WMD, it doesn't provide its own live preview.

I used markItUp!, along with a simple JSP (using MarkdownJ) for one of my open-source projects (a Markdown plugin for Roller). If you're using another server-side technology, replace that simple JSP as appropriate.

I actually starting using this before I came across WMD. I'd agree, WMD is great, but has only just been open-sourced and is, at this stage, more difficult to customize the behavior of.

Solution 3 - Javascript

I would recommend marked, which is lightweight, efficient, easy to use and supports GitHub Flavored Markdown (GFM) as well. It can be used in either server(nodejs) or client(browser) sides.

Solution 4 - Javascript

As far as I know there really isn't any other browser-based editor for Markdown, at least none as extensive as the WMD editor.

Showdown is a Markdown converter in JS, which forms the basis for the HTML preview of WMD. They're both made by <http://attacklab.net/>;.

And as far as I know there haven't been any big complaints about both (at least not on the Markdown mailing list). So go for it.

Solution 5 - Javascript

There is one named Showdown and it is currently hosted here: https://github.com/coreyti/showdown

And there is https://github.com/evilstreak/markdown-js :)

Solution 6 - Javascript

Strapdown.js, which was recently released, "makes it embarrassingly simple to create elegant Markdown documents. No server-side compilation required."

Solution 7 - Javascript

I've not tested this, but here is another option:

Markdown wysiwyg

Solution 8 - Javascript

The question is even more ancient now but also even more relevant since much of the mentioned code is several years out of date.

However, I did find a few that still seems current:

Jquery-Markedit - This was forked from wmd-edit quite some time ago and refactored to use jQuery. Seems good at first sight.

EpicEditor - is also still maintained, has a flexible parser and, as you can see below, the author is highly responsive (see below). IT seems to have good documentation as well. Sadly not working with IE9.

MarkdownDeep is a third option that is still current. The interesting point with this one is support for Markdown Extra. Has a dependency on JQuery (actually you can also implement without JQuery). Based on the .NET version so documentation is more aligned to that than the JS version. This also works with IE9. It is very easy to use (with JQuery) & very simple. No significant development happening with this though as far as I can see.

js-markdown-extra is a fairly accurate port of the PHP library and is still under maintenance. It supports Markdown Extra of course.

Solution 9 - Javascript

The question is ancient but hopefully this might help someone. I have just recently published a working version of my own Javascript markdown editor, uedit. You can find the source code here. It works on most browsers (including IE6+) and doesn't depend on any external JS libraries.

Solution 10 - Javascript

After trying with several plugins to solve my own needs of offering a MarkDown seudo-WYSIWYG I ended implementing my own one:

Maybe is not as powerful as all the solutions commented here but I think that none is as simple and easy to integrate and customize.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionwebmatView Question on Stackoverflow
Solution 1 - JavascriptJeff AtwoodView Answer on Stackoverflow
Solution 2 - JavascriptmyabcView Answer on Stackoverflow
Solution 3 - JavascriptmalcomwuView Answer on Stackoverflow
Solution 4 - JavascriptLasarView Answer on Stackoverflow
Solution 5 - JavascriptBijanView Answer on Stackoverflow
Solution 6 - Javascriptuser67416View Answer on Stackoverflow
Solution 7 - JavascriptVirtuosiMediaView Answer on Stackoverflow
Solution 8 - JavascriptJulian KnightView Answer on Stackoverflow
Solution 9 - JavascriptschmrzView Answer on Stackoverflow
Solution 10 - JavascriptfguillenView Answer on Stackoverflow