Pergunta

A bit of a long-winded question(s)...

Is anyone aware of a markdown parser for markItUp editor? I tried showdown.js but it appears there is no way to integrate it with markItUp. This is despite makrItUp having a configuration API that allows you to specify a custom parser path and variable using previewParserVar and previewParserPath arguments.

In reality I prefer using WMD Editor, but when I tried using the SO version on gitHub I found it to be very buggy. There are so many forks but I'm unable to find a stable one.

I eventually found this fork, jquery-markedit, which is really cool, but when the form is posted, unlike the original wmd-fork, the form does not post the parsed text. The textarea data is posted as plain text. The text is parsed fine for preview, but it seems odd that it's not parsed for submission.

So I decided to resort to markItUp which has a markdown set but does not have a parser.

The version of WMD that SO currently uses is different from that on gitHub wmd-fork - is anyone aware of the current version SO is using and if it is available as open source?

Foi útil?

Solução

Yes I'm aware of markitup!. I recently (today) tested markitup! and WMD. What strikes me is markitup! seems to have no undo functionality. And the header (h1 - h6) functionality in markitup! requires 6 buttons, but only 1 button in WMD.

Among all WMD repos, I've downloaded and tested these 2 repos, and I think they seem promising (I've tested them only 30 seconds each so I might be very incorrect).

  • umamo, which (says its commit messages) adds LaTeX math.
  • klipstein, which fixes buggs and makes | separators visible.

Both are based on the Open Library repo, which I need because it makes it possible to have many editors open at once. However, that fork did lots of refactoring; I don't know if that'll make it messy to merge changes from other branches.

I have no idea which repo Stack Overflow uses.

By the way, here is an interesting showdown.js repo (showdown is the JavaScript implementation of Markdown used by WMD), which implements support for RTL languages (according to its readme file). I'm considering including those changes in yet another WMD repo :-)
https://github.com/hasenj/showdown/tree/

Hope this helps,
Magnus

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top