by Jonovono · 13y ago · 0 comments
For an example check out http://mangomarkdown.com/ (which powers foldingtext).
There are a few projects that do this, but not open source, that I can find! It might not be that hard to change the current ones that go side by side to do this.
(I am planning to work on one, but have not gotten around to doing much, and will probably take a different approach to it than this)
I'm not hiding markup like Mango, except for latex formulas which I'm replacing with mathjax rendering - but they turn back into source the moment the cursor enters them. It's inspired by emacs' auctex and more directly by https://play.google.com/store/apps/details?id=com.jamesmc.wr... (gratis but closed).
I'm also surprised almost nobody is taking the syntax-highlight-IS-the-preview approach to markdown editing. I've heard the "plain markdown lets me focus on content and ignore formatting" idea, but I don't see how e.g. bigger font for headings is undesirable. It's not that variable fonts are hard to implement - CodeMirror already solved this: http://codemirror.net/demo/variableheight.html (Variable fonts are not a pure win. They screw up indentation => I'm planning to use monospace for all leading spaces, as well as list bullets/numbers.)
Looks similar to mangomarkdown, and it's open source. I'm using it in a project I'm working on and loving it.
Edit: actually, I think I like the mango style even better. Didn't realize this before, but the markdown tags are hidden after you type - pretty neat. (My initial test was a few heading tags, which still display the '#' in the margin).
edit: Ya, I still like mongo and how they make the header kinda fade out, have support for checkboxes (well folding text does), and when you are on a unordered list and press enter it automatically makes a new one. Mango has just made a codemirror mode to handle this it looks like.
Getting everything nice in up to date desktop browsers is relatively simple (contenteditable div, little bit of javascript, easy). Try to introduce iOS into the mix and things get very messy, very quickly.
That turns out to be quite a challenge
For example Mango fails with any combination of bold and italic