Skip to content
JavaScript CSS Makefile
Branch: master
Clone or download


A markdown editor you really want.


Editor is sponsored by Typlog.


Editor is not a WYSIWYG editor, it is a plain text markdown editor. Thanks for the great project codemirror, without which editor can never be created.

Basic Usage

The easiest way to use Editor is to simply load the script and stylesheet:

<link rel="stylesheet" href="" />
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>

You can also use jsdelivr CDN:

<link rel="stylesheet" href="//">
<script src="//"></script>
<script src="//"></script>

Having done this, an editor instance can be created:

var editor = new Editor();

The editor will take the position of the first <textarea> element.

Get the content

To get back the edited content you use:



If you are using component, you can install it with:

$ component install lepture/editor


If you are using seajs, you can install it with:

$ spm install lepture/editor


You can build the dist files with grunt. After this repo is cloned, dig into the repo, and install everything you need:

$ npm install
$ npm install grunt-cli -g

Now you can create the dist files:

$ grunt transport

You can get everything you need in the build directory.


The Editor Class accepts an option as the parameter. The supported options are:

  • element (DOM)

    The element of the textarea. The default value is the first <textarea>.

  • tools (array or false)

    If set false, the editor will have no toolbar.

  • status (array or false)

    If set false, the editor will have no statusbar.

  • actions (object)

  • shortcuts (object)


new Editor({
  element: document.getElementById('editor'),
  toolbar: []


Contribution is welcome. As a way to keep all code clean, we use Grunt to build our distributed files. Make sure you have read our Contributing Guide.


MIT. Copyright (c) 2013 - 2014 by Hsiaoming Yang

You can’t perform that action at this time.