Enhance all editors inside the window


Enhance one editor

MarkdownIME.Enhance(document.getElementById('editor')); // vanilla DOM element.
MarkdownIME.Enhance($('#editor')); // jQuery's array-like stuff.

TinyMCE Notice: your <textarea> element is not supported by MarkdownIME. If you don’t know how to get the real rich editor, consider the lazy way: Enhance all editors inside the window.

Full Example

MarkdownIME has NO dependency, and you can use it with just a content-editable element.

Demo on CodePen:

<div id="editor" contentEditable="true">
    <p>Input your text here...</p>

<script src="/path/to/MarkdownIME.js"></script>
    var editor = document.getElementById('editor');


Every API is under MarkdownIME namespace; you shall add MarkdownIME. prefix.

var editors1 = Scan(window); // Wrong :(
var editors2 = MarkdownIME.Scan(window); // Correct :)

Basic API


Return all content-editable elements inside the window, which could be enhanced by MarkdownIME.


Enhance one or more editor, making MarkdownIME work on.

editors could be a content-editable HTML element, or an array of HTML elements.

Return one or more MarkdownIME.Editor instances if successful.


Scan and enhance all editors, then show a notice.

Return nothing.

Advanced API

Here is a Travis-CI generated document:

However, reading the source code is always the best solution.


  1. 2016-02-15 - laobubu - typedoc generated doc
  2. 2015-12-12 - laobubu - first version
  3. 2016-01-04 - laobubu - adding two recipes
  4. 2016-02-05 - laobubu - adding codepen example and style
  5. 2016-04-02 - laobubu - update titles