Skip to content

A WYSIWYG Markdown Editor for browsers. Break the Wall between writing and previewing.

License

Notifications You must be signed in to change notification settings

laobubu/HyperMD

Repository files navigation

HyperMD

HyperMD Markdown Editor

Breaks the Wallbetweenwritingandpreview,in a Markdown Editor.

NPM versionBuild Status

Online Demo|Examples|Documentation

Trung văn giới thiệu

// npm install --save hypermd codemirror
varHyperMD=require('hypermd')
varmyTextarea=document.getElementById('input-area')
vareditor=HyperMD.fromTextArea(myTextarea)

Remix on Glitch

Also for RequireJS, Parcel, webpack, plain browser env.Read the Doc

Why use HyperMD?

HyperMD is a set ofCodeMirroradd-ons / modes / themes / commands / keymap etc.

You may use both original CodeMirror and HyperMD on the same page.

🌈 Write, and preview on the fly

  • Regular Markdownblocks and elements
    • Strong,Emphasis,Strikethrough,Code
    • Links,Images
    • Title / Quote / Code Block / List / Horizontal Rule
  • Markdown Extension
    • Simple Table
    • Footnote1
    • TODO List(the box is clickable)
    • YAML Front Matter
    • $\LaTeX$Formula, inline or block display mode2
    • Emoji::joy:=> 😂(also support custom emoji)
  • And more

💪 BetterMarkdown-ing Experience

  • Upload Imagesand files via clipboard, or drag'n'drop
  • Alt+Clickto open link / jump to footnote1
  • Hoverto read footnotes
  • Copy and Paste,translate HTML into Markdown4
  • Easy and ready-to-useKey-bindings(aka. KeyMap)

🎁CodeMirrorbenefits

  • Syntax Highlight for code blocks, supports 120+ languages5.Mode can be loaded on-demand.
  • Configurable key-bindings
  • Diff and Merge
  • Themes6
  • Almost all of CodeMirror addons!

🔨 Extensible and Customizable

🎹 TailoredKeyMap"HyperMD":

  • Table
    • EnterCreate a table with| column | line |
    • EnterInsert new row, or finish a table (if last row is empty)
    • TaborShift-Tabto navigate between cells
  • List
    • TaborShift-Tabto indent/unindent current list item
  • Formattinga nearby word (or selected text)
    • Ctrl+Bbold
    • Ctrl+Iemphasis
    • Ctrl+Dstrikethrough

Special Thanks

💎Service and Resource

IcoMoon- The IconPack(Free Version)
Demo Pageuses IcoMoon icons. Related files are stored indemo/svgicon.
CodeCogs- An Open Source Scientific Library
FoldMathuses codecogs' service as the default TeX MathRenderer.
(You may load PowerPack to use other renderer, eg. KaTeX or MathJax)
SM.MS- A Free Image Hosting service
Demo PageandPowerPack/insert-file-with-smmsuse SM.MS open API to upload user-inserted images.
(If you want to integrate SM.MS service, use the PowerPack)
EmojiOne- Open emoji icons
Demo PageandPowerPack/fold-emoji-with-emojioneuse Emoji icons provided free byEmojiOne (free license)
(You may use other alternatives, eg. twemoji from twitter)
CodeMirror- In-browser code editor.
RequireJS- A JavaScript AMD module loader.
KaTeX- The fastest math typesetting library for the web.
marked, turndown and more remarkable libs.

🌟Sponsors

🙏Sponsors(sorted by date)

☕Phithon☕c*i☕*Yuan☕*Xiuzhang ☕*Junjie🌟 viên tán khoa kỹ☕*Di

Contributing

HyperMD is a personal Open-Source project bylaobubu. Contributions are welcomed. You may:


Footnotes

  1. Ctrl+Click works too, but will jump to the footnote if exists.2

  2. Math block use$$to wrap your TeX expression.

  3. Disabled by default, seedoc;#use two hash symbol# if tag name contains spaces.

  4. UseCtrl+Shift+Vto paste plain text.

  5. Languages as many as CodeMirror supports.

  6. If the theme is not designed for HyperMD, some features might not be present.