mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
upgrade editor.md(many bug exists)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* @file code-block-dialog.js
|
||||
* @author pandao
|
||||
* @version 1.2.0
|
||||
* @updateTime 2015-03-07
|
||||
* @updateTime 2021-12-03
|
||||
* {@link https://github.com/pandao/editor.md}
|
||||
* @license MIT
|
||||
*/
|
||||
@@ -14,7 +14,7 @@
|
||||
var factory = function (exports) {
|
||||
var cmEditor;
|
||||
var pluginName = "code-block-dialog";
|
||||
|
||||
|
||||
// for CodeBlock dialog select
|
||||
var codeLanguages = exports.codeLanguages = {
|
||||
asp : ["ASP", "vbscript"],
|
||||
@@ -65,8 +65,8 @@
|
||||
var cursor = cm.getCursor();
|
||||
var selection = cm.getSelection();
|
||||
var classPrefix = this.classPrefix;
|
||||
var dialogName = classPrefix + pluginName, dialog;
|
||||
var dialogLang = lang.dialog.codeBlock;
|
||||
var dialogName = classPrefix + pluginName, dialog;
|
||||
var dialogLang = lang.dialog.codeBlock;
|
||||
|
||||
cm.focus();
|
||||
|
||||
@@ -80,18 +80,19 @@
|
||||
this.dialogLockScreen();
|
||||
dialog.show();
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
var dialogHTML = "<div class=\"" + classPrefix + "code-toolbar\">" +
|
||||
dialogLang.selectLabel + "<select><option selected=\"selected\" value=\"\">" + dialogLang.selectDefaultText + "</option></select>" +
|
||||
dialogLang.selectLabel + "<select class=\"select_language\" style=\"margin-left: 8px;\"><option selected=\"selected\" value=\"\">" + dialogLang.selectDefaultText + "</option></select>" +
|
||||
"</div>" +
|
||||
"<textarea placeholder=\"coding now....\" style=\"display:none;\">" + selection + "</textarea>";
|
||||
"<textarea placeholder=\"" + dialogLang.placeholder + "\" style=\"display:none;\">" + selection + "</textarea>" +
|
||||
"<div class='dialog-warning'><span class='warning-sign'></span>Execute code feature only available for Shell and Bash</div>";
|
||||
|
||||
dialog = this.createDialog({
|
||||
name : dialogName,
|
||||
title : dialogLang.title,
|
||||
width : 780,
|
||||
height : 565,
|
||||
height : 551,
|
||||
mask : settings.dialogShowMask,
|
||||
drag : settings.dialogDraggable,
|
||||
content : dialogHTML,
|
||||
@@ -129,7 +130,7 @@
|
||||
|
||||
return false;
|
||||
}],
|
||||
cancel : [lang.buttons.cancel, function() {
|
||||
cancel : [lang.buttons.cancel, function() {
|
||||
this.hide().lockScreen(false).hideMask();
|
||||
|
||||
return false;
|
||||
@@ -140,7 +141,7 @@
|
||||
|
||||
var langSelect = dialog.find("select");
|
||||
|
||||
if (langSelect.find("option").length === 1)
|
||||
if (langSelect.find("option").length === 1)
|
||||
{
|
||||
for (var key in codeLanguages)
|
||||
{
|
||||
@@ -150,9 +151,9 @@
|
||||
|
||||
langSelect.append("<option value=\"other\">" + dialogLang.otherLanguage + "</option>");
|
||||
}
|
||||
|
||||
|
||||
var mode = langSelect.find("option:selected").attr("mode");
|
||||
|
||||
|
||||
var cmConfig = {
|
||||
mode : (mode) ? mode : "text/html",
|
||||
theme : settings.theme,
|
||||
@@ -173,29 +174,42 @@
|
||||
showTrailingSpace : true,
|
||||
highlightSelectionMatches : true
|
||||
};
|
||||
|
||||
|
||||
var textarea = dialog.find("textarea");
|
||||
var cmObj = dialog.find(".CodeMirror");
|
||||
|
||||
if (dialog.find(".CodeMirror").length < 1)
|
||||
if (dialog.find(".CodeMirror").length < 1)
|
||||
{
|
||||
cmEditor = exports.$CodeMirror.fromTextArea(textarea[0], cmConfig);
|
||||
cmObj = dialog.find(".CodeMirror");
|
||||
|
||||
cmObj.css({
|
||||
"float" : "none",
|
||||
"float" : "none",
|
||||
margin : "8px 0",
|
||||
border : "1px solid #ddd",
|
||||
border : "1px solid rgba(141, 141, 141, 0.5)",
|
||||
backgroundColor : "#2c2c2c",
|
||||
fontSize : settings.fontSize,
|
||||
width : "100%",
|
||||
height : "390px"
|
||||
height : "300px",
|
||||
fontFamily : "Inter",
|
||||
color: "#F4F4F4"
|
||||
});
|
||||
|
||||
let gutter = cmObj.find(".CodeMirror-gutters");
|
||||
gutter.css({
|
||||
backgroundColor: "#262626",
|
||||
borderRight: "1px solid rgba(141, 141, 141, 0.5)",
|
||||
color: "#C6C6C6"
|
||||
});
|
||||
|
||||
let sizer = cmObj.find(".CodeMirror-sizer");
|
||||
sizer.css("margin-top", "3px");
|
||||
|
||||
cmEditor.on("change", function(cm) {
|
||||
textarea.val(cm.getValue());
|
||||
});
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
cmEditor.setValue(cm.getSelection());
|
||||
@@ -208,10 +222,10 @@
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
// CommonJS/Node.js
|
||||
if (typeof require === "function" && typeof exports === "object" && typeof module === "object")
|
||||
{
|
||||
{
|
||||
module.exports = factory;
|
||||
}
|
||||
else if (typeof define === "function") // AMD/CMD/Sea.js
|
||||
@@ -228,7 +242,7 @@
|
||||
factory(editormd);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
factory(window.editormd);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @file emoji-dialog.js
|
||||
* @author pandao
|
||||
* @version 1.2.0
|
||||
* @updateTime 2015-03-08
|
||||
* @updateTime 2021-12-02
|
||||
* {@link https://github.com/pandao/editor.md}
|
||||
* @license MIT
|
||||
*/
|
||||
@@ -69,13 +69,13 @@
|
||||
var _this = this;
|
||||
var cm = this.cm;
|
||||
var settings = _this.settings;
|
||||
|
||||
|
||||
if (!settings.emoji)
|
||||
{
|
||||
alert("settings.emoji == false");
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
var path = settings.pluginPath + pluginName + "/";
|
||||
var editor = this.editor;
|
||||
var cursor = cm.getCursor();
|
||||
@@ -88,16 +88,16 @@
|
||||
var lang = this.lang;
|
||||
var dialogName = classPrefix + pluginName, dialog;
|
||||
var dialogLang = lang.dialog.emoji;
|
||||
|
||||
|
||||
var dialogContent = [
|
||||
"<div class=\"" + classPrefix + "emoji-dialog-box\" style=\"width: 760px;height: 334px;margin-bottom: 8px;overflow: hidden;\">",
|
||||
"<div class=\"" + classPrefix + "emoji-dialog-box\" style=\"width: 760px;margin-bottom: 8px;overflow: hidden;\">",
|
||||
"<div class=\"" + classPrefix + "tab\"></div>",
|
||||
"</div>",
|
||||
].join("\n");
|
||||
|
||||
cm.focus();
|
||||
|
||||
if (editor.find("." + dialogName).length > 0)
|
||||
if (editor.find("." + dialogName).length > 0)
|
||||
{
|
||||
dialog = editor.find("." + dialogName);
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
this.dialogShowMask(dialog);
|
||||
this.dialogLockScreen();
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dialog = this.createDialog({
|
||||
@@ -124,25 +124,25 @@
|
||||
backgroundColor : settings.dialogMaskBgColor
|
||||
},
|
||||
buttons : {
|
||||
enter : [lang.buttons.enter, function() {
|
||||
enter : [lang.buttons.enter, function() {
|
||||
cm.replaceSelection(selecteds.join(" "));
|
||||
this.hide().lockScreen(false).hideMask();
|
||||
|
||||
|
||||
return false;
|
||||
}],
|
||||
cancel : [lang.buttons.cancel, function() {
|
||||
cancel : [lang.buttons.cancel, function() {
|
||||
this.hide().lockScreen(false).hideMask();
|
||||
|
||||
|
||||
return false;
|
||||
}]
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var category = ["Github emoji", "Twemoji", "Font awesome", "Editor.md logo"];
|
||||
var tab = dialog.find("." + classPrefix + "tab");
|
||||
|
||||
if (tab.html() === "")
|
||||
if (tab.html() === "")
|
||||
{
|
||||
var head = "<ul class=\"" + classPrefix + "tab-head\">";
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
var container = "<div class=\"" + classPrefix + "tab-container\">";
|
||||
|
||||
for (var x = 0; x < 4; x++)
|
||||
for (var x = 0; x < 4; x++)
|
||||
{
|
||||
var display = (x === 0) ? "" : "display:none;";
|
||||
container += "<div class=\"" + classPrefix + "tab-box\" style=\"height: 260px;overflow: hidden;overflow-y: auto;" + display + "\"></div>";
|
||||
@@ -165,9 +165,9 @@
|
||||
|
||||
container += "</div>";
|
||||
|
||||
tab.append(container);
|
||||
tab.append(container);
|
||||
}
|
||||
|
||||
|
||||
var tabBoxs = tab.find("." + classPrefix + "tab-box");
|
||||
var emojiCategories = ["github-emoji", "twemoji", "font-awesome", logoPrefix];
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
//console.log("break =>", cname);
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
var pagination = function(data, type) {
|
||||
var rowNumber = (type === "editormd-logo") ? "5" : 20;
|
||||
var pageTotal = Math.ceil(data.length / rowNumber);
|
||||
@@ -193,17 +193,17 @@
|
||||
for (var x = 0; x < rowNumber; x++)
|
||||
{
|
||||
var emoji = $.trim(data[(i * rowNumber) + x]);
|
||||
|
||||
|
||||
if (typeof emoji !== "undefined" && emoji !== "")
|
||||
{
|
||||
var img = "", icon = "";
|
||||
|
||||
|
||||
if (type === "github-emoji")
|
||||
{
|
||||
var src = (emoji === "+1") ? "plus1" : emoji;
|
||||
src = (src === "black_large_square") ? "black_square" : src;
|
||||
src = (src === "moon") ? "waxing_gibbous_moon" : src;
|
||||
|
||||
|
||||
src = exports.emoji.path + src + exports.emoji.ext;
|
||||
img = "<img src=\"" + src + "\" width=\"24\" class=\"emoji\" title=\":" + emoji + ":\" alt=\":" + emoji + ":\" />";
|
||||
row += "<a href=\"javascript:;\" value=\":" + emoji + ":\" title=\":" + emoji + ":\" class=\"" + classPrefix + "emoji-btn\">" + img + "</a>";
|
||||
@@ -227,7 +227,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
row += "<a href=\"javascript:;\" value=\"\"></a>";
|
||||
row += "<a href=\"javascript:;\" value=\"\"></a>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,10 +237,10 @@
|
||||
}
|
||||
|
||||
table += "</div>";
|
||||
|
||||
|
||||
return table;
|
||||
};
|
||||
|
||||
|
||||
if (emojiTabIndex === 0)
|
||||
{
|
||||
for (var i = 0, len = $data.length; i < len; i++)
|
||||
@@ -258,15 +258,15 @@
|
||||
$tab.find("." + classPrefix + "emoji-btn").bind(exports.mouseOrTouch("click", "touchend"), function() {
|
||||
$(this).toggleClass("selected");
|
||||
|
||||
if ($(this).hasClass("selected"))
|
||||
if ($(this).hasClass("selected"))
|
||||
{
|
||||
selecteds.push($(this).attr("value"));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (emojiData.length < 1)
|
||||
{
|
||||
|
||||
if (emojiData.length < 1)
|
||||
{
|
||||
if (typeof dialog.loading === "function") {
|
||||
dialog.loading(true);
|
||||
}
|
||||
@@ -281,8 +281,8 @@
|
||||
emojiData[logoPrefix] = logos;
|
||||
drawTable();
|
||||
});
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
drawTable();
|
||||
}
|
||||
@@ -298,10 +298,10 @@
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
// CommonJS/Node.js
|
||||
if (typeof require === "function" && typeof exports === "object" && typeof module === "object")
|
||||
{
|
||||
{
|
||||
module.exports = factory;
|
||||
}
|
||||
else if (typeof define === "function") // AMD/CMD/Sea.js
|
||||
@@ -318,7 +318,7 @@
|
||||
factory(editormd);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
factory(window.editormd);
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
if (helpContent.html() === "")
|
||||
{
|
||||
$.get(path + "help.md", function(text) {
|
||||
var md = exports.$marked(text);
|
||||
var md = exports.$marked.parse(text);
|
||||
helpContent.html(md);
|
||||
|
||||
helpContent.find("a").attr("target", "_blank");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
- [Mastering Markdown](https://guides.github.com/features/mastering-markdown/ "Mastering Markdown")
|
||||
- [Markdown Basics](https://help.github.com/articles/markdown-basics/ "Markdown Basics")
|
||||
- [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/ "GitHub Flavored Markdown")
|
||||
- [Markdown 语法说明(简体中文)](https://www.iminho.me/wiki/docs/mindoc/markdown-basic.md "Markdown 语法说明(简体中文)")
|
||||
- [Markdown 语法说明(简体中文)](http://www.markdown.cn/ "Markdown 语法说明(简体中文)")
|
||||
- [Markdown 語法說明(繁體中文)](http://markdown.tw/ "Markdown 語法說明(繁體中文)")
|
||||
|
||||
##### 键盘快捷键 (Keyboard shortcuts)
|
||||
@@ -66,15 +66,11 @@
|
||||
|
||||
##### 流程图参考 (Flowchart reference)
|
||||
|
||||
[https://www.iminho.me/wiki/docs/mindoc/flowchart.md](https://www.iminho.me/wiki/docs/mindoc/flowchart.md)
|
||||
[http://adrai.github.io/flowchart.js/](http://adrai.github.io/flowchart.js/)
|
||||
|
||||
##### 时序图参考 (SequenceDiagram reference)
|
||||
|
||||
[https://www.iminho.me/wiki/docs/mindoc/sequence.md](https://www.iminho.me/wiki/docs/mindoc/sequence.md)
|
||||
|
||||
#### 基于 mermaid 的甘特图、时序图以及流程图
|
||||
|
||||
<https://www.iminho.me/wiki/docs/mindoc/mermaid.md>
|
||||
[http://bramp.github.io/js-sequence-diagrams/](http://bramp.github.io/js-sequence-diagrams/)
|
||||
|
||||
##### TeX/LaTeX reference
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @file link-dialog.js
|
||||
* @author pandao
|
||||
* @version 1.2.1
|
||||
* @updateTime 2015-06-09
|
||||
* @updateTime 2021-12-02
|
||||
* {@link https://github.com/pandao/editor.md}
|
||||
* @license MIT
|
||||
*/
|
||||
@@ -41,19 +41,18 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
var dialogHTML = "<div class=\"" + classPrefix + "form\">" +
|
||||
"<label>" + linkLang.url + "</label>" +
|
||||
var dialogHTML = "<div class=\"" + classPrefix + "form\">" +
|
||||
"<label>" + linkLang.url + "</label>" +
|
||||
"<input type=\"text\" value=\"http://\" data-url />" +
|
||||
"<br/>" +
|
||||
"<label>" + linkLang.urlTitle + "</label>" +
|
||||
"<input type=\"text\" value=\"" + selection + "\" data-title />" +
|
||||
"<br/>" +
|
||||
"<label>" + linkLang.urlTitle + "</label>" +
|
||||
"<input type=\"text\" value=\"" + selection + "\" data-title />" +
|
||||
"<br/>" +
|
||||
"</div>";
|
||||
|
||||
dialog = this.createDialog({
|
||||
title : linkLang.title,
|
||||
width : 380,
|
||||
height : 211,
|
||||
content : dialogHTML,
|
||||
mask : settings.dialogShowMask,
|
||||
drag : settings.dialogDraggable,
|
||||
@@ -78,13 +77,13 @@
|
||||
alert(linkLang.titleEmpty);
|
||||
return false;
|
||||
}*/
|
||||
|
||||
|
||||
var str = "[" + title + "](" + url + " \"" + title + "\")";
|
||||
|
||||
|
||||
if (title == "")
|
||||
{
|
||||
str = "[" + url + "](" + url + ")";
|
||||
}
|
||||
}
|
||||
|
||||
cm.replaceSelection(str);
|
||||
|
||||
@@ -93,7 +92,7 @@
|
||||
return false;
|
||||
}],
|
||||
|
||||
cancel : [lang.buttons.cancel, function() {
|
||||
cancel : [lang.buttons.cancel, function() {
|
||||
this.hide().lockScreen(false).hideMask();
|
||||
|
||||
return false;
|
||||
@@ -104,10 +103,10 @@
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
// CommonJS/Node.js
|
||||
if (typeof require === "function" && typeof exports === "object" && typeof module === "object")
|
||||
{
|
||||
{
|
||||
module.exports = factory;
|
||||
}
|
||||
else if (typeof define === "function") // AMD/CMD/Sea.js
|
||||
@@ -124,7 +123,7 @@
|
||||
factory(editormd);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
factory(window.editormd);
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
var dialogContent = "<textarea placeholder=\"coding now....\" style=\"display:none;\">" + selection + "</textarea>";
|
||||
var dialogContent = "<textarea placeholder=\"" + dialogLang.placeholder + "\" style=\"display:none;\">" + selection + "</textarea>";
|
||||
|
||||
dialog = this.createDialog({
|
||||
name : dialogName,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @file table-dialog.js
|
||||
* @author pandao
|
||||
* @version 1.2.1
|
||||
* @updateTime 2015-06-09
|
||||
* @updateTime 2021-12-02
|
||||
* {@link https://github.com/pandao/editor.md}
|
||||
* @license MIT
|
||||
*/
|
||||
@@ -78,32 +78,36 @@
|
||||
|
||||
var lang = this.lang;
|
||||
var dialogLang = lang.dialog.table;
|
||||
|
||||
|
||||
var dialogContent = [
|
||||
"<div class=\"editormd-form\" style=\"padding: 13px 0;\">",
|
||||
"<label>" + dialogLang.cellsLabel + "</label>",
|
||||
dialogLang.rows + " <input type=\"number\" value=\"3\" class=\"number-input\" style=\"width:40px;\" max=\"100\" min=\"2\" data-rows /> ",
|
||||
dialogLang.cols + " <input type=\"number\" value=\"2\" class=\"number-input\" style=\"width:40px;\" max=\"100\" min=\"1\" data-cols /><br/>",
|
||||
"<label>" + dialogLang.alignLabel + "</label>",
|
||||
"<div class=\"fa-btns\"></div>",
|
||||
"<label>" + dialogLang.cellsLabel + "</label>",
|
||||
"<div class='form-flex'>",
|
||||
"<span style=\"margin-right: 8px;\">" + dialogLang.rows + "</span>",
|
||||
" <input type=\"number\" value=\"3\" class=\"number-input\" style=\"width:50px;\" max=\"100\" min=\"2\" data-rows /> ",
|
||||
"<span style=\"margin: 0 8px;\">" + dialogLang.cols + "</span>",
|
||||
" <input type=\"number\" value=\"2\" class=\"number-input\" style=\"width:50px;\" max=\"100\" min=\"1\" data-cols /><br/>",
|
||||
"</div>",
|
||||
"<br>",
|
||||
"<label>" + dialogLang.alignLabel + "</label>",
|
||||
"<div class=\"fa-btns\"></div>",
|
||||
"</div>"
|
||||
].join("\n");
|
||||
|
||||
if (editor.find("." + dialogName).length > 0)
|
||||
if (editor.find("." + dialogName).length > 0)
|
||||
{
|
||||
dialog = editor.find("." + dialogName);
|
||||
|
||||
this.dialogShowMask(dialog);
|
||||
this.dialogLockScreen();
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dialog = this.createDialog({
|
||||
name : dialogName,
|
||||
title : dialogLang.title,
|
||||
width : 360,
|
||||
height : 226,
|
||||
mask : settings.dialogShowMask,
|
||||
drag : settings.dialogDraggable,
|
||||
content : dialogContent,
|
||||
@@ -127,14 +131,14 @@
|
||||
right : hrLine + ":"
|
||||
};
|
||||
|
||||
if ( rows > 1 && cols > 0)
|
||||
if ( rows > 1 && cols > 0)
|
||||
{
|
||||
for (var r = 0, len = rows; r < len; r++)
|
||||
for (var r = 0, len = rows; r < len; r++)
|
||||
{
|
||||
var row = [];
|
||||
var head = [];
|
||||
|
||||
for (var c = 0, len2 = cols; c < len2; c++)
|
||||
for (var c = 0, len2 = cols; c < len2; c++)
|
||||
{
|
||||
if (r === 1) {
|
||||
head.push(alignSign[align]);
|
||||
@@ -146,7 +150,7 @@
|
||||
if (r === 1) {
|
||||
table += "| " + head.join(" | ") + " |" + "\n";
|
||||
}
|
||||
|
||||
|
||||
table += "| " + row.join( (cols === 1) ? "" : " | " ) + " |" + "\n";
|
||||
}
|
||||
}
|
||||
@@ -158,7 +162,7 @@
|
||||
return false;
|
||||
}],
|
||||
|
||||
cancel : [lang.buttons.cancel, function() {
|
||||
cancel : [lang.buttons.cancel, function() {
|
||||
this.hide().lockScreen(false).hideMask();
|
||||
|
||||
return false;
|
||||
@@ -175,7 +179,7 @@
|
||||
var _lang = dialogLang.aligns;
|
||||
var values = ["_default", "left", "center", "right"];
|
||||
|
||||
for (var i = 0, len = icons.length; i < len; i++)
|
||||
for (var i = 0, len = icons.length; i < len; i++)
|
||||
{
|
||||
var checked = (i === 0) ? " checked=\"checked\"" : "";
|
||||
var btn = "<a href=\"javascript:;\"><label for=\"editormd-table-dialog-radio"+i+"\" title=\"" + _lang[i] + "\">";
|
||||
@@ -189,10 +193,10 @@
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
// CommonJS/Node.js
|
||||
if (typeof require === "function" && typeof exports === "object" && typeof module === "object")
|
||||
{
|
||||
{
|
||||
module.exports = factory;
|
||||
}
|
||||
else if (typeof define === "function") // AMD/CMD/Sea.js
|
||||
@@ -209,7 +213,7 @@
|
||||
factory(editormd);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
factory(window.editormd);
|
||||
|
||||
Reference in New Issue
Block a user