• Stars
    star
    469
  • Rank 93,595 (Top 2 %)
  • Language
    TypeScript
  • License
    Other
  • Created almost 9 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A fresh way to write well-formatted text, by typing markdownized stuff on web.

MarkdownIME

MarkdownIME is a fresh and fast way to make text formatted, and a minimal & powerful web rich-text editor.

  • MINIMAL: No 3rd-party dependency. No buttons or stylesheets. Only require one div[contentEditable] and one script tags.
  • POWERFUL: With Markdown markups and shortkeys, you can typeset your document on-the-fly.

Try out the demo. Works like a charm on desktop and mobile!

Build Status npm npm bundle size (minified) npm bundle size (minified + gzip)

Quickstart / Guide

Make a simpliest editor:

  1. Include MarkdownIME
    • Via NPM: const MarkdownIME = require("markdown-ime")
    • or, via Script Tag: <script src="https://build.laobubu.net/MarkdownIME/MarkdownIME.js"></script>
  2. Insert an HTML tag: <div contentEditable id="editor"><p>Hello World</p></div>
  3. Activate MarkdownIME in one JavaScript: MarkdownIME.Enhance(MarkdownIME.Scan(window));

Using other editor like TinyMCE / Quill? Please follow the examples.

More info can be found in examples and manual

Features

Notice

With MarkdownIME, user inputs Markdown, you get HTML Nodes instantly -- all Markdown markups are discarded.

If you want the intact Markdown rather than rendered HTML, maybe HyperMD -- a WYSIWYG Markdown Editor is what you need!

Supported Editor

  • Vanilla contenteditable elements - a div[contentEditable] makes everything.
  • Other rich-text editor based on contentEditable

Supported Shorkeys

Full list can be found here.

Key Feature Key Feature
Ctrl + I Toggle Italic Ctrl + B Toggle Bold
Ctrl + U Toggle Underline
Ctrl + Shift + = superscript Ctrl + = subscript
Ctrl + L justifyLeft Ctrl + E justifyCenter
Ctrl + R justifyRight
Key Feature
` Mark selected text as inline-code

Shortkeys in Tables

Key Feature Key Feature
Insert Insert a column after Shift + Insert Insert a column before
Tab Go next cell, or insert a row Shift + Tab Go previous cell
Up Go cell above current Down Go cell under current
Key Feature
Enter If current row is empty, finish the table. Otherwise, insert a row below.

Note that some shortkeys might be unavaliable in some browsers; MarkdownIME shortkeys are disabled in TinyMCE by default.

Supported Markdown Markups

Block Elements

  • Headers (beginning with # )
  • Horizontal ( --- )
  • (Nested) Lists
  • (Nested) Blockquote
  • Code Block

Span Elements

  • Links
  • Emphasis
  • In-line Code
  • Strikethrough
  • Images
  • Emojis ( eg. :) or :smile: )

Tables

  • Create a table with | table | column | headers | and Enter key
  • Use shortkeys to navigate and master the table (see above)

More Repositories

1

HyperMD

A WYSIWYG Markdown Editor for browsers. Break the Wall between writing and previewing.
TypeScript
1,482
star
2

jekyll-theme-EasyBook

Another Jekyll Blog Theme "EasyBook"
CSS
121
star
3

ssland

A lightweight Shadowsocks multi-user web-frontend panel.
Python
97
star
4

QRScaner

A QR Code scanner extension for Firefox.
JavaScript
47
star
5

openshift-php5.5-cgi-apache

QuickStart for fully free OpenShift + PHP5.5 + Apache
Shell
25
star
6

youtube-index

a wonderful PHP YouTube proxy
PHP
14
star
7

PuTTY

Another modified PuTTY.
C
12
star
8

Chrome-WebSocket-Notification-Extension-Example

Chrome WebSocket Notification Extension Example
JavaScript
12
star
9

STM32-Voice-Changer

A Real-time Voice Changer based on SensorTile (STM32L4).
C
11
star
10

HostsGenerator

A PHP Web util designed to generate Hosts file
PHP
7
star
11

sensor-android

An app which fetch sensor's data and share with other devices via UDP
Java
5
star
12

SynapticsPen

Just another Synaptics SDK test
C++
5
star
13

typecho_ContentIndex

一个为 Typecho 文章单页生成内容目录的插件。
PHP
4
star
14

ezStruct

Easiest way to pack/unpack struct data with three steps in Node.js.
JavaScript
4
star
15

BFlight

A dummy flight firmware based on STM32CubeMX HAL Driver
C
3
star
16

UpperMachine

Flexible Serial Port App for Windows
C#
2
star
17

laobubu.github.io

laobubu.net website
HTML
2
star
18

laobubu.blog

Well, Do Not Care.
HTML
2
star
19

WinMate

Make any window on top, transparent etc.
C++
2
star
20

DropBox-API-For-PHP

DropBox-API For PHP. No special module and mode required.
1
star
21

lite-dev

Lightweight development server and compiler.
JavaScript
1
star
22

PHP-AJAX-Terminal

A good PHP AJAX Terminal for programmers who want to do shell and eval php code
1
star
23

laobubu-strange-stuffs

Strange Stuffs
PHP
1
star
24

pico_WebServlet_temple_for_eclipse

直接导入Eclipse不需要J2EE就可以进行Java Web编程了!
Java
1
star
25

typecho_RewriteRule

使 Typecho 在 404 时可以遵循设定的规则,重定向到其他地址上。
PHP
1
star