(function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module unless amdModuleId is set define('simditor-markdown', ["jquery","simditor","to-markdown","marked"], function (a0,b1,c2,d3) { return (root['SimditorMarkdown'] = factory(a0,b1,c2,d3)); }); } else if (typeof exports === 'object') { // Node. Does not work with strict CommonJS, but // only CommonJS-like environments that support module.exports, // like Node. module.exports = factory(require("jquery"),require("simditor"),require("to-markdown"),require("marked")); } else { root['SimditorMarkdown'] = factory(jQuery,Simditor,toMarkdown,marked); } }(this, function ($, Simditor, toMarkdown, marked) { var SimditorMarkdown, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; SimditorMarkdown = (function(superClass) { extend(SimditorMarkdown, superClass); function SimditorMarkdown() { return SimditorMarkdown.__super__.constructor.apply(this, arguments); } SimditorMarkdown.prototype.name = 'markdown'; SimditorMarkdown.prototype.icon = 'markdown'; SimditorMarkdown.prototype.needFocus = false; SimditorMarkdown.prototype._init = function() { SimditorMarkdown.__super__._init.call(this); this.markdownEl = $('
').insertBefore(this.editor.body); this.textarea = $('