55 points · by arthurtw · 10y ago · 26 comments
They present the document as WYSIWYG with markdown hidden, but unhide any markdown surrounding or directly adjacent to the cursor. (So the markup from an italic or link span are only visible if you are adjacent to or within the span.)
It's a nice balance between looking pretty and letting me edit markdown directly. I'd love to have an open source editor library that acts like this.
The default mode is WYSIWYG since Markdown syntax frustrates people who don't know Markdown well.
Thanks for mentioning Typora! It's an interesting implementation. I've thought about that approach (in-place real-time preview as you type Markdown text) before, but inside a browser, it's too cumbersome to fight against the inconsistent contenteditable behavior.
aren't these rather crazy terms for a text editor ?
The code has three parts: Markdown to HTML text, HTML DOM to Markdown, and the editor. The total size is about 30KB uncompressed (27KB JS + 3KB CSS). It didn't use any icon font or images.
It has all the markup showing, and italize, boldens and changes size of text according to the tags, as well as color coding.
My goal is to make Markdown and HTML editors working together. I want to support Markdown because it's very productive for long-form article writing.