Skip to content

kongkx/drupal_editormd

Repository files navigation

Editor.md for Drupal

  • Editor.md: The open source embeddable online markdown editor (component), based on CodeMirror & jQuery & Marked.

TODOS:

  • Implement PluginManager like CKeditor
  • IMCE Integration

Notes: the editor.md js file used in this module has been modified.

  • settings.toolbarHandles take priority so that plugin can hack editor.md's default behaviours easily

Origin

if (typeof toolbarIconHandlers[name] !== "undefined") 
{
    $.proxy(toolbarIconHandlers[name], _this)(cm);
}
else 
{
    if (typeof settings.toolbarHandlers[name] !== "undefined") 
    {
        $.proxy(settings.toolbarHandlers[name], _this)(cm, icon, cursor, selection);
    }
}

Altered

if (typeof settings.toolbarHandlers[name] !== "undefined")
{
    $.proxy(settings.toolbarHandlers[name], _this)(cm, icon, cursor, selection);
}
else 
{
    if (typeof toolbarIconHandlers[name] !== "undefined")
    {
        $.proxy(toolbarIconHandlers[name], _this)(cm);
    }
}
  • onchange event should be called, no matter whether it is in preview mode;

About

Editor.md for Drupal 8

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published