An Embeddable JavaScript MarkdownExtended Editor

MDE-Editor is an embeddable JavaScript Markdown Extended editor based on EpicEditor.


MDE-Editor

A web editor for the Markdown-Extended (MDE) syntax.

This editor is a custom version of the original EpicEditor to use the PHP MarkdownExtended parser. It uses the MDE-Service PHP interface to post the markdown content of the editor (via a synchronous XMLHttpRequest) at each run (the original content is not parsed in JavaScript).

Installation

To install and use it, you will need Bower and Composer:

wget --no-check-certificate https://github.com/piwi/mde-editor/archive/master.tar.gz
tar -xvf master.tar.gz
cd mde-editor-master
bower install
composer install

Then you can browse the demonstration page: http://your.localhost/path/to/mde-editor-master/.

Usage

Usage of the MDE-Editor is very similar to the one of EpicEditor except that:

If you move the package files, you NEED to keep the mde_editor_interface.php PHP script in the same directory as the mde-editor.js (or override the parser_options settings - see below) and redefine the basePath option to fit your environment. You also need to redefine the $autoloader variable at the top of the mde_editor_interface.php script.

Options

The default options of the MDE-Editor are (they will be merged with the default EpicEditor options in final object):

    container:  'mde-editor',
    basePath:   'bower_components/epiceditor/epiceditor/',
    autogrow:   true,
    file: {
        name:           'mde-editor',
        defaultContent: 'Type your *markdown*-**extended** content here ...',
        autoSave:       5000
    },
    parserOptions: {
        silent:      false,
        interface:   'mde-editor/mde_editor_interface.php',
        mdeOptions: {}
    }

The last parserOptions element concerns the MDE parser:

License

MDE-Editor is authored by Pierre Cassat and licensed under a MIT license.

To transmit a bug or a feature request, see http://github.com/piwi/mde-editor/issues.

Fork me on GitHub