Breaks the Wall between writing and preview, in a Markdown Editor.
HyperMD is a set of [CodeMirror] add-ons / modes / themes.
You may use both original CodeMirror and HyperMD on the same page.
- Write, and preview on the fly
- Alt+Click to follow link / footnote 2
- Syntax Highlight for 120+ languages code blocks 3
- Hover to read footnotes
- Copy and Paste, translate HTML into Markdown 4
- Massive CodeMirror Add-ons can be loaded, including:
- VIM/Emacs mode and Configurable keybindings
- Diff and Merge
- Fullscreen
- Themes 5
- Code Block Highlighting language modes are loaded automatically
- Upload Images copy and paste, or drag'n'drop
- [And More...][doc]
[RequireJS] is recommended and used during developing HyperMD. If you prefer importing all css/js with HTML tags manually, see <./docs/examples/ai1.html>.
Once you've loaded [RequireJS] and CSS files, you may set-up a editor like demo/index.js
does.
Usually, to transform your <textarea>
into HyperMD editor, all you need is just two lines:
var myTextarea = document.getElementById('input-area')
var editor = HyperMD.fromTextArea(myTextarea)
And that's all. Configuration guide can be found in [doc].
HyperMD is a personal Open-Source project by [laobubu]. Contributions are welcomed. You may:
- Fork on GitHub , create your amazing themes and add-ons.
- Buy me a Coffee
- Spread HyperMD to the world!
[CodeMirror]: https://codemirror.net/ A powerful text editor for the browser. [RequireJS]: http://requirejs.org/ A JavaScript AMD module loader. [MathJax]: https://www.mathjax.org/ A display engine for mathematics. [marked]: https://github.com/chjj/marked/ A markdown parser and compiler. [turndown]: https://github.com/domchristie/turndown An HTML to Markdown converter [turndown-plugin-gfm]: https://github.com/domchristie/turndown-plugin-gfm Turndown plugin to add GitHub Flavored Markdown extensions [laobubu]: https://laobubu.net/ The author of HyperMD. [doc]: https://laobubu.net/HyperMD/docs/ HyperMD Documentation
Footnotes
-
Math block is just like code block. Use
$$
to wrap your math expression. ↩ -
Ctrl+Click works too, but will jump to the footnote if exists. ↩
-
Languages as many as CodeMirror supports. ↩
-
Use
Ctrl+Shift+V
to paste plain text. ↩ -
If the theme is not designed for HyperMD, some features might not be present. ↩