gitmyhub

editor.md

JavaScript ★ 14k updated 2y ago

The open source embeddable online markdown editor (component).

Embeddable Markdown editor for websites that shows a live formatted preview alongside the text you type, built on CodeMirror, jQuery, and Marked.

JavaScriptjQueryCodeMirrorMarkedsetup: easycomplexity 2/5

Editor.md is a Markdown editor that web developers can drop into their own website. Markdown is a simple way of writing formatted text using plain characters, for example putting a hash in front of a line to make it a heading, so that it can later be turned into a web page. This project gives visitors a text box where they type Markdown on one side and see the formatted result update live on the other side. It is described as an embeddable component, meaning it is a piece you add to your page rather than a standalone app, and it is built on three existing JavaScript tools: CodeMirror, jQuery, and Marked.

The feature list is long. It supports standard Markdown as well as the GitHub-flavored variant, real-time preview, image upload, inserting tables and code blocks, code folding, search and replace, a read-only mode, switchable themes, and multiple languages. It also handles several Markdown extensions: a table of contents, emoji, task lists, and @-mention links. For more technical writing it can render mathematical formulas written in TeX, along with flowcharts and sequence diagrams drawn from text. The README says it works in major browsers, including the old Internet Explorer 8, and on tablets such as the iPad.

You can install it through the npm or Bower package managers, or download it directly. To use it, you include its stylesheet and script files along with jQuery, then call a function that turns a chosen page element into the editor. A separate function converts stored Markdown text into HTML for display. The README notes plainly that the reverse, converting HTML back into Markdown, is not supported, with a maybe in the future.

The README is bilingual, repeating its description in English and Chinese, and it ends with a long list of configuration options and their default values.

Where it fits