mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-18 07:24:29 -06:00
Update dependencies; Travis build in more node versions
This commit is contained in:
parent
169752eb9d
commit
c2cf41fc16
14
.travis.yml
14
.travis.yml
@ -1,15 +1,17 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- '0.12'
|
- "5"
|
||||||
|
- "4"
|
||||||
|
- '0.12'
|
||||||
before_script:
|
before_script:
|
||||||
- npm install -g gulp
|
- npm install -g gulp
|
||||||
script: gulp
|
script: gulp
|
||||||
deploy:
|
deploy:
|
||||||
provider: npm
|
provider: npm
|
||||||
email: support@nextstepwebs.com
|
email: support@nextstepwebs.com
|
||||||
api_key:
|
api_key:
|
||||||
secure: nADZupyOhJAhTQgr5uOIydbDEjCTAj+3nGHW7ZBJUrVJcb0uR4pg8ngmwrUpvaCeNXgKPG9Uag75/mPcBre9ly2cigBIG9LHlxImlF8qi1jRJykcNRmBb9N2MJJj+zdAMwLaF5Ns+f2v3zt97qxovbEzunhXGcZeCaxc6y40nDM8OTyo0PESNBjQYqaNblt2gO2KHysrwFL8i4kCCKLa+HOBLu2iqgk/fYVqTmfhEeOiiwQ4lIXJeyPyzgb3OPhKCMV1FI5H0T48fRD0MPczt8ds3Daj1OjCbIZurQ7s1dcKwz1g6TKATN59HcMsSarW4lImrEeYmfQxz2F5NjKDRhnith5V0W2IssrkpDG9teTFQ20eQdl5cpnlGjgBvsjb8GhPLR44GvefyJL4+kJGI3O1KVq3/7wbmu/IXrvhtKHEQSdGL2PTqW8QxKasAoUCnk3LGZKN12g8bg0xDg2tvoCUk5Z3asHLRdCJpDbBq1h8QfZ4HV5VLYjr84xduOUZbEUtfMVAixPpJ4h1E3OXJ1wil97BlHjxOZ8JkkxJg5lgSUZ/O/QWwJokEAYXR9c+ouMoVokChAyleV77cRZ5qLn9zbnUxZtnKX8w0IUKeu95/z8QgiaRcERKVCpZvceo8Qw0Y+JoiEtno7Zg/nsrZGxsS6K/V3yg1QQmT3bjDHQ=
|
secure: nADZupyOhJAhTQgr5uOIydbDEjCTAj+3nGHW7ZBJUrVJcb0uR4pg8ngmwrUpvaCeNXgKPG9Uag75/mPcBre9ly2cigBIG9LHlxImlF8qi1jRJykcNRmBb9N2MJJj+zdAMwLaF5Ns+f2v3zt97qxovbEzunhXGcZeCaxc6y40nDM8OTyo0PESNBjQYqaNblt2gO2KHysrwFL8i4kCCKLa+HOBLu2iqgk/fYVqTmfhEeOiiwQ4lIXJeyPyzgb3OPhKCMV1FI5H0T48fRD0MPczt8ds3Daj1OjCbIZurQ7s1dcKwz1g6TKATN59HcMsSarW4lImrEeYmfQxz2F5NjKDRhnith5V0W2IssrkpDG9teTFQ20eQdl5cpnlGjgBvsjb8GhPLR44GvefyJL4+kJGI3O1KVq3/7wbmu/IXrvhtKHEQSdGL2PTqW8QxKasAoUCnk3LGZKN12g8bg0xDg2tvoCUk5Z3asHLRdCJpDbBq1h8QfZ4HV5VLYjr84xduOUZbEUtfMVAixPpJ4h1E3OXJ1wil97BlHjxOZ8JkkxJg5lgSUZ/O/QWwJokEAYXR9c+ouMoVokChAyleV77cRZ5qLn9zbnUxZtnKX8w0IUKeu95/z8QgiaRcERKVCpZvceo8Qw0Y+JoiEtno7Zg/nsrZGxsS6K/V3yg1QQmT3bjDHQ=
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
repo: NextStepWebs/simplemde-markdown-editor
|
repo: NextStepWebs/simplemde-markdown-editor
|
||||||
branch: production
|
branch: production
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* simplemde v1.8.1
|
* simplemde v1.8.2
|
||||||
* Copyright Next Step Webs, Inc.
|
* Copyright Next Step Webs, Inc.
|
||||||
* @link https://github.com/NextStepWebs/simplemde-markdown-editor
|
* @link https://github.com/NextStepWebs/simplemde-markdown-editor
|
||||||
* @license MIT
|
* @license MIT
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* simplemde v1.8.1
|
* simplemde v1.8.2
|
||||||
* Copyright Next Step Webs, Inc.
|
* Copyright Next Step Webs, Inc.
|
||||||
* @link https://github.com/NextStepWebs/simplemde-markdown-editor
|
* @link https://github.com/NextStepWebs/simplemde-markdown-editor
|
||||||
* @license MIT
|
* @license MIT
|
||||||
@ -7,7 +7,7 @@
|
|||||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SimpleMDE = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SimpleMDE = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||||
(function (global){
|
(function (global){
|
||||||
|
|
||||||
; Typo = global.Typo = require("/Users/wescossick/Documents/Websites/simplemde-markdown-editor/node_modules/codemirror-spell-checker/src/js/typo.js");
|
; Typo = global.Typo = require("D:\\My Web Sites\\simplemde-markdown-editor\\node_modules\\codemirror-spell-checker\\src\\js\\typo.js");
|
||||||
CodeMirror = global.CodeMirror = require("codemirror");
|
CodeMirror = global.CodeMirror = require("codemirror");
|
||||||
; var __browserify_shim_require__=require;(function browserifyShim(module, define, require) {
|
; var __browserify_shim_require__=require;(function browserifyShim(module, define, require) {
|
||||||
// Initialize data globally to reduce memory consumption
|
// Initialize data globally to reduce memory consumption
|
||||||
@ -105,7 +105,7 @@ if(!String.prototype.includes) {
|
|||||||
}).call(global, module, undefined, undefined);
|
}).call(global, module, undefined, undefined);
|
||||||
|
|
||||||
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
||||||
},{"/Users/wescossick/Documents/Websites/simplemde-markdown-editor/node_modules/codemirror-spell-checker/src/js/typo.js":2,"codemirror":6}],2:[function(require,module,exports){
|
},{"D:\\My Web Sites\\simplemde-markdown-editor\\node_modules\\codemirror-spell-checker\\src\\js\\typo.js":2,"codemirror":6}],2:[function(require,module,exports){
|
||||||
(function (global){
|
(function (global){
|
||||||
; var __browserify_shim_require__=require;(function browserifyShim(module, exports, require, define, browserify_shim__define__module__export__) {
|
; var __browserify_shim_require__=require;(function browserifyShim(module, exports, require, define, browserify_shim__define__module__export__) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -1888,7 +1888,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||||||
// given line.
|
// given line.
|
||||||
function updateWidgetHeight(line) {
|
function updateWidgetHeight(line) {
|
||||||
if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)
|
if (line.widgets) for (var i = 0; i < line.widgets.length; ++i)
|
||||||
line.widgets[i].height = line.widgets[i].node.offsetHeight;
|
line.widgets[i].height = line.widgets[i].node.parentNode.offsetHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do a bulk-read of the DOM positions and sizes needed to draw the
|
// Do a bulk-read of the DOM positions and sizes needed to draw the
|
||||||
@ -3287,8 +3287,9 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||||||
var out;
|
var out;
|
||||||
for (var i = 0; i < sel.ranges.length; i++) {
|
for (var i = 0; i < sel.ranges.length; i++) {
|
||||||
var range = sel.ranges[i];
|
var range = sel.ranges[i];
|
||||||
var newAnchor = skipAtomic(doc, range.anchor, bias, mayClear);
|
var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];
|
||||||
var newHead = skipAtomic(doc, range.head, bias, mayClear);
|
var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);
|
||||||
|
var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);
|
||||||
if (out || newAnchor != range.anchor || newHead != range.head) {
|
if (out || newAnchor != range.anchor || newHead != range.head) {
|
||||||
if (!out) out = sel.ranges.slice(0, i);
|
if (!out) out = sel.ranges.slice(0, i);
|
||||||
out[i] = new Range(newAnchor, newHead);
|
out[i] = new Range(newAnchor, newHead);
|
||||||
@ -3297,54 +3298,59 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||||||
return out ? normalizeSelection(out, sel.primIndex) : sel;
|
return out ? normalizeSelection(out, sel.primIndex) : sel;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure a given position is not inside an atomic range.
|
function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
|
||||||
function skipAtomic(doc, pos, bias, mayClear) {
|
var line = getLine(doc, pos.line);
|
||||||
var flipped = false, curPos = pos;
|
if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) {
|
||||||
var dir = bias || 1;
|
var sp = line.markedSpans[i], m = sp.marker;
|
||||||
doc.cantEdit = false;
|
if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&
|
||||||
search: for (;;) {
|
(sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
|
||||||
var line = getLine(doc, curPos.line);
|
if (mayClear) {
|
||||||
if (line.markedSpans) {
|
signal(m, "beforeCursorEnter");
|
||||||
for (var i = 0; i < line.markedSpans.length; ++i) {
|
if (m.explicitlyCleared) {
|
||||||
var sp = line.markedSpans[i], m = sp.marker;
|
if (!line.markedSpans) break;
|
||||||
if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) &&
|
else {--i; continue;}
|
||||||
(sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) {
|
|
||||||
if (mayClear) {
|
|
||||||
signal(m, "beforeCursorEnter");
|
|
||||||
if (m.explicitlyCleared) {
|
|
||||||
if (!line.markedSpans) break;
|
|
||||||
else {--i; continue;}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!m.atomic) continue;
|
|
||||||
var newPos = m.find(dir < 0 ? -1 : 1);
|
|
||||||
if (cmp(newPos, curPos) == 0) {
|
|
||||||
newPos.ch += dir;
|
|
||||||
if (newPos.ch < 0) {
|
|
||||||
if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1));
|
|
||||||
else newPos = null;
|
|
||||||
} else if (newPos.ch > line.text.length) {
|
|
||||||
if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0);
|
|
||||||
else newPos = null;
|
|
||||||
}
|
|
||||||
if (!newPos) {
|
|
||||||
if (flipped) {
|
|
||||||
// Driven in a corner -- no valid cursor position found at all
|
|
||||||
// -- try again *with* clearing, if we didn't already
|
|
||||||
if (!mayClear) return skipAtomic(doc, pos, bias, true);
|
|
||||||
// Otherwise, turn off editing until further notice, and return the start of the doc
|
|
||||||
doc.cantEdit = true;
|
|
||||||
return Pos(doc.first, 0);
|
|
||||||
}
|
|
||||||
flipped = true; newPos = pos; dir = -dir;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
curPos = newPos;
|
|
||||||
continue search;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!m.atomic) continue;
|
||||||
|
|
||||||
|
if (oldPos) {
|
||||||
|
var near = m.find(dir < 0 ? 1 : -1), diff;
|
||||||
|
if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft) near = movePos(doc, near, -dir, line);
|
||||||
|
if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
|
||||||
|
return skipAtomicInner(doc, near, pos, dir, mayClear);
|
||||||
|
}
|
||||||
|
|
||||||
|
var far = m.find(dir < 0 ? -1 : 1);
|
||||||
|
if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight) far = movePos(doc, far, dir, line);
|
||||||
|
return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null;
|
||||||
}
|
}
|
||||||
return curPos;
|
}
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ensure a given position is not inside an atomic range.
|
||||||
|
function skipAtomic(doc, pos, oldPos, bias, mayClear) {
|
||||||
|
var dir = bias || 1;
|
||||||
|
var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||
|
||||||
|
(!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||
|
||||||
|
skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||
|
||||||
|
(!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));
|
||||||
|
if (!found) {
|
||||||
|
doc.cantEdit = true;
|
||||||
|
return Pos(doc.first, 0);
|
||||||
|
}
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
function movePos(doc, pos, dir, line) {
|
||||||
|
if (dir < 0 && pos.ch == 0) {
|
||||||
|
if (pos.line > doc.first) return clipPos(doc, Pos(pos.line - 1));
|
||||||
|
else return null;
|
||||||
|
} else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {
|
||||||
|
if (pos.line < doc.first + doc.size - 1) return Pos(pos.line + 1, 0);
|
||||||
|
else return null;
|
||||||
|
} else {
|
||||||
|
return new Pos(pos.line, pos.ch + dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5909,7 +5915,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||||||
if (dir > 0 && !moveOnce(!first)) break;
|
if (dir > 0 && !moveOnce(!first)) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var result = skipAtomic(doc, Pos(line, ch), origDir, true);
|
var result = skipAtomic(doc, Pos(line, ch), pos, origDir, true);
|
||||||
if (!possible) result.hitSide = true;
|
if (!possible) result.hitSide = true;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -7733,7 +7739,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||||||
parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;";
|
parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;";
|
||||||
removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
|
removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
|
||||||
}
|
}
|
||||||
return widget.height = widget.node.offsetHeight;
|
return widget.height = widget.node.parentNode.offsetHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addLineWidget(doc, handle, node, options) {
|
function addLineWidget(doc, handle, node, options) {
|
||||||
@ -8154,7 +8160,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||||||
spanEndStyle = "";
|
spanEndStyle = "";
|
||||||
}
|
}
|
||||||
if (m.className) spanStyle += " " + m.className;
|
if (m.className) spanStyle += " " + m.className;
|
||||||
if (m.css) css = m.css;
|
if (m.css) css = (css ? css + ";" : "") + m.css;
|
||||||
if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle;
|
if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle;
|
||||||
if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle;
|
if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle;
|
||||||
if (m.title && !title) title = m.title;
|
if (m.title && !title) title = m.title;
|
||||||
@ -8423,6 +8429,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||||||
this.id = ++nextDocId;
|
this.id = ++nextDocId;
|
||||||
this.modeOption = mode;
|
this.modeOption = mode;
|
||||||
this.lineSep = lineSep;
|
this.lineSep = lineSep;
|
||||||
|
this.extend = false;
|
||||||
|
|
||||||
if (typeof text == "string") text = this.splitLines(text);
|
if (typeof text == "string") text = this.splitLines(text);
|
||||||
updateDoc(this, {from: start, to: start, text: text});
|
updateDoc(this, {from: start, to: start, text: text});
|
||||||
@ -9930,7 +9937,7 @@ CodeMirror.overlayMode = function(base, overlay, combine) {
|
|||||||
|
|
||||||
// THE END
|
// THE END
|
||||||
|
|
||||||
CodeMirror.version = "5.8.1";
|
CodeMirror.version = "5.9.1";
|
||||||
|
|
||||||
return CodeMirror;
|
return CodeMirror;
|
||||||
});
|
});
|
||||||
@ -10782,7 +10789,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|||||||
f: s.f,
|
f: s.f,
|
||||||
|
|
||||||
prevLine: s.prevLine,
|
prevLine: s.prevLine,
|
||||||
thisLine: s.this,
|
thisLine: s.thisLine,
|
||||||
|
|
||||||
block: s.block,
|
block: s.block,
|
||||||
htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
|
htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
|
||||||
@ -12967,7 +12974,7 @@ function toggleFullScreen(editor) {
|
|||||||
* Action for toggling bold.
|
* Action for toggling bold.
|
||||||
*/
|
*/
|
||||||
function toggleBold(editor) {
|
function toggleBold(editor) {
|
||||||
_toggleBlock(editor, "bold", "**");
|
_toggleBlock(editor, "bold", editor.options.blockStyles.bold);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -12975,7 +12982,7 @@ function toggleBold(editor) {
|
|||||||
* Action for toggling italic.
|
* Action for toggling italic.
|
||||||
*/
|
*/
|
||||||
function toggleItalic(editor) {
|
function toggleItalic(editor) {
|
||||||
_toggleBlock(editor, "italic", "*");
|
_toggleBlock(editor, "italic", editor.options.blockStyles.italic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -13079,6 +13086,16 @@ function drawImage(editor) {
|
|||||||
_replaceSelection(cm, stat.image, options.insertTexts.image);
|
_replaceSelection(cm, stat.image, options.insertTexts.image);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action for drawing a table.
|
||||||
|
*/
|
||||||
|
function drawTable(editor) {
|
||||||
|
var cm = editor.codemirror;
|
||||||
|
var stat = getState(cm);
|
||||||
|
var options = editor.options;
|
||||||
|
_replaceSelection(cm, stat.table, options.insertTexts.table);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action for drawing a horizontal rule.
|
* Action for drawing a horizontal rule.
|
||||||
*/
|
*/
|
||||||
@ -13543,6 +13560,12 @@ var toolbarBuiltInButtons = {
|
|||||||
className: "fa fa-picture-o",
|
className: "fa fa-picture-o",
|
||||||
title: "Insert Image (Ctrl+Alt+I)"
|
title: "Insert Image (Ctrl+Alt+I)"
|
||||||
},
|
},
|
||||||
|
"table": {
|
||||||
|
name: "table",
|
||||||
|
action: drawTable,
|
||||||
|
className: "fa fa-table",
|
||||||
|
title: "Insert Table"
|
||||||
|
},
|
||||||
"horizontal-rule": {
|
"horizontal-rule": {
|
||||||
name: "horizontal-rule",
|
name: "horizontal-rule",
|
||||||
action: drawHorizontalRule,
|
action: drawHorizontalRule,
|
||||||
@ -13578,9 +13601,14 @@ var toolbarBuiltInButtons = {
|
|||||||
var insertTexts = {
|
var insertTexts = {
|
||||||
link: ["[", "](http://)"],
|
link: ["[", "](http://)"],
|
||||||
image: [""],
|
image: [""],
|
||||||
|
table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],
|
||||||
horizontalRule: ["", "\n\n-----\n\n"]
|
horizontalRule: ["", "\n\n-----\n\n"]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var blockStyles = {
|
||||||
|
"bold": "**",
|
||||||
|
"italic": "*"
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface of SimpleMDE.
|
* Interface of SimpleMDE.
|
||||||
@ -13657,8 +13685,12 @@ function SimpleMDE(options) {
|
|||||||
options.insertTexts = extend({}, insertTexts, options.insertTexts || {});
|
options.insertTexts = extend({}, insertTexts, options.insertTexts || {});
|
||||||
|
|
||||||
|
|
||||||
|
// Merging the blockStyles, with the given options
|
||||||
|
options.blockStyles = extend({}, blockStyles, options.blockStyles || {});
|
||||||
|
|
||||||
|
|
||||||
// Change unique_id to uniqueId for backwards compatibility
|
// Change unique_id to uniqueId for backwards compatibility
|
||||||
if(options.autosave.unique_id != undefined && options.autosave.unique_id != "")
|
if(options.autosave != undefined && options.autosave.unique_id != undefined && options.autosave.unique_id != "")
|
||||||
options.autosave.uniqueId = options.autosave.unique_id;
|
options.autosave.uniqueId = options.autosave.unique_id;
|
||||||
|
|
||||||
|
|
||||||
@ -14053,6 +14085,7 @@ SimpleMDE.toggleUnorderedList = toggleUnorderedList;
|
|||||||
SimpleMDE.toggleOrderedList = toggleOrderedList;
|
SimpleMDE.toggleOrderedList = toggleOrderedList;
|
||||||
SimpleMDE.drawLink = drawLink;
|
SimpleMDE.drawLink = drawLink;
|
||||||
SimpleMDE.drawImage = drawImage;
|
SimpleMDE.drawImage = drawImage;
|
||||||
|
SimpleMDE.drawTable = drawTable;
|
||||||
SimpleMDE.drawHorizontalRule = drawHorizontalRule;
|
SimpleMDE.drawHorizontalRule = drawHorizontalRule;
|
||||||
SimpleMDE.undo = undo;
|
SimpleMDE.undo = undo;
|
||||||
SimpleMDE.redo = redo;
|
SimpleMDE.redo = redo;
|
||||||
@ -14105,6 +14138,9 @@ SimpleMDE.prototype.drawLink = function() {
|
|||||||
SimpleMDE.prototype.drawImage = function() {
|
SimpleMDE.prototype.drawImage = function() {
|
||||||
drawImage(this);
|
drawImage(this);
|
||||||
};
|
};
|
||||||
|
SimpleMDE.prototype.drawTable = function() {
|
||||||
|
drawTable(this);
|
||||||
|
};
|
||||||
SimpleMDE.prototype.drawHorizontalRule = function() {
|
SimpleMDE.prototype.drawHorizontalRule = function() {
|
||||||
drawHorizontalRule(this);
|
drawHorizontalRule(this);
|
||||||
};
|
};
|
||||||
|
4
dist/simplemde.min.css
vendored
4
dist/simplemde.min.css
vendored
File diff suppressed because one or more lines are too long
18
dist/simplemde.min.js
vendored
18
dist/simplemde.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,6 +4,7 @@ var gulp = require("gulp"),
|
|||||||
uglify = require("gulp-uglify"),
|
uglify = require("gulp-uglify"),
|
||||||
concat = require("gulp-concat"),
|
concat = require("gulp-concat"),
|
||||||
header = require("gulp-header"),
|
header = require("gulp-header"),
|
||||||
|
buffer = require("vinyl-buffer"),
|
||||||
pkg = require("./package.json"),
|
pkg = require("./package.json"),
|
||||||
debug = require("gulp-debug"),
|
debug = require("gulp-debug"),
|
||||||
eslint = require("gulp-eslint"),
|
eslint = require("gulp-eslint"),
|
||||||
@ -50,6 +51,7 @@ function taskBrowserify(opts) {
|
|||||||
gulp.task("browserify:dev", ["lint"], function() {
|
gulp.task("browserify:dev", ["lint"], function() {
|
||||||
return taskBrowserify({debug:true, standalone:"SimpleMDE"})
|
return taskBrowserify({debug:true, standalone:"SimpleMDE"})
|
||||||
.pipe(source("simplemde.debug.js"))
|
.pipe(source("simplemde.debug.js"))
|
||||||
|
.pipe(buffer())
|
||||||
.pipe(header(banner, {pkg: pkg}))
|
.pipe(header(banner, {pkg: pkg}))
|
||||||
.pipe(gulp.dest("./debug/"));
|
.pipe(gulp.dest("./debug/"));
|
||||||
});
|
});
|
||||||
@ -57,6 +59,7 @@ gulp.task("browserify:dev", ["lint"], function() {
|
|||||||
gulp.task("browserify:min", ["lint"], function() {
|
gulp.task("browserify:min", ["lint"], function() {
|
||||||
return taskBrowserify({standalone:"SimpleMDE"})
|
return taskBrowserify({standalone:"SimpleMDE"})
|
||||||
.pipe(source("simplemde.js"))
|
.pipe(source("simplemde.js"))
|
||||||
|
.pipe(buffer())
|
||||||
.pipe(header(banner, {pkg: pkg}))
|
.pipe(header(banner, {pkg: pkg}))
|
||||||
.pipe(gulp.dest("./debug/"));
|
.pipe(gulp.dest("./debug/"));
|
||||||
});
|
});
|
||||||
@ -67,6 +70,7 @@ gulp.task("scripts", ["browserify:dev", "browserify:min", "lint"], function() {
|
|||||||
return gulp.src(js_files)
|
return gulp.src(js_files)
|
||||||
.pipe(concat("simplemde.min.js"))
|
.pipe(concat("simplemde.min.js"))
|
||||||
.pipe(uglify())
|
.pipe(uglify())
|
||||||
|
.pipe(buffer())
|
||||||
.pipe(header(banner, {pkg: pkg}))
|
.pipe(header(banner, {pkg: pkg}))
|
||||||
.pipe(gulp.dest("./dist/"));
|
.pipe(gulp.dest("./dist/"));
|
||||||
});
|
});
|
||||||
@ -80,10 +84,12 @@ gulp.task("styles", ["prettify-css"], function() {
|
|||||||
|
|
||||||
return gulp.src(css_files)
|
return gulp.src(css_files)
|
||||||
.pipe(concat("simplemde.css"))
|
.pipe(concat("simplemde.css"))
|
||||||
|
.pipe(buffer())
|
||||||
.pipe(header(banner, {pkg: pkg}))
|
.pipe(header(banner, {pkg: pkg}))
|
||||||
.pipe(gulp.dest("./debug/"))
|
.pipe(gulp.dest("./debug/"))
|
||||||
.pipe(minifycss())
|
.pipe(minifycss())
|
||||||
.pipe(rename("simplemde.min.css"))
|
.pipe(rename("simplemde.min.css"))
|
||||||
|
.pipe(buffer())
|
||||||
.pipe(header(banner, {pkg: pkg}))
|
.pipe(header(banner, {pkg: pkg}))
|
||||||
.pipe(gulp.dest("./dist/"));
|
.pipe(gulp.dest("./dist/"));
|
||||||
});
|
});
|
||||||
|
83
package.json
83
package.json
@ -3,66 +3,67 @@
|
|||||||
"version": "1.8.2",
|
"version": "1.8.2",
|
||||||
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor. Features autosaving and spell checking.",
|
"description": "A simple, beautiful, and embeddable JavaScript Markdown editor. Features autosaving and spell checking.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"embeddable",
|
"embeddable",
|
||||||
"markdown",
|
"markdown",
|
||||||
"editor",
|
"editor",
|
||||||
"javascript",
|
"javascript",
|
||||||
"wysiwyg"
|
"wysiwyg"
|
||||||
],
|
],
|
||||||
"homepage": "https://github.com/NextStepWebs/simplemde-markdown-editor",
|
"homepage": "https://github.com/NextStepWebs/simplemde-markdown-editor",
|
||||||
"main": "./src/js/simplemde.js",
|
"main": "./src/js/simplemde.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"company": "Next Step Webs, Inc.",
|
"company": "Next Step Webs, Inc.",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Wes Cossick",
|
"name": "Wes Cossick",
|
||||||
"url": "http://www.WesCossick.com"
|
"url": "http://www.WesCossick.com"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor/issues"
|
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"codemirror": "codemirror/CodeMirror",
|
"codemirror": "codemirror/CodeMirror",
|
||||||
"codemirror-spell-checker": "nextstepwebs/codemirror-spell-checker",
|
"codemirror-spell-checker": "nextstepwebs/codemirror-spell-checker",
|
||||||
"marked": "0.3.5"
|
"marked": "0.3.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^11.2.0",
|
"browserify": "^11.2.0",
|
||||||
"browserify-shim": "^3.8.10",
|
"browserify-shim": "^3.8.10",
|
||||||
"debug": "^2.2.0",
|
"debug": "^2.2.0",
|
||||||
"eslint": "^1.6.0",
|
"eslint": "^1.6.0",
|
||||||
"gulp": "*",
|
"gulp": "*",
|
||||||
"gulp-concat": "*",
|
"gulp-concat": "*",
|
||||||
"gulp-debug": "^2.1.1",
|
"gulp-debug": "^2.1.1",
|
||||||
"gulp-eslint": "^1.0.0",
|
"gulp-eslint": "^1.0.0",
|
||||||
"gulp-header": "*",
|
"gulp-header": "*",
|
||||||
"gulp-jsbeautifier": "*",
|
"gulp-jsbeautifier": "*",
|
||||||
"gulp-minify-css": "^1.2.1",
|
"gulp-minify-css": "^1.2.1",
|
||||||
"gulp-rename": "^1.2.2",
|
"gulp-rename": "^1.2.2",
|
||||||
"gulp-uglify": "*",
|
"gulp-uglify": "*",
|
||||||
"vinyl-source-stream": "^1.1.0"
|
"vinyl-source-stream": "^1.1.0",
|
||||||
|
"vinyl-buffer ": "*"
|
||||||
},
|
},
|
||||||
"browserify": {
|
"browserify": {
|
||||||
"transform": [
|
"transform": [
|
||||||
"browserify-shim"
|
"browserify-shim"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"browser": {
|
"browser": {
|
||||||
"spell-checker": "./node_modules/codemirror-spell-checker/src/js/spell-checker.js",
|
"spell-checker": "./node_modules/codemirror-spell-checker/src/js/spell-checker.js",
|
||||||
"typo": "./node_modules/codemirror-spell-checker/src/js/typo.js"
|
"typo": "./node_modules/codemirror-spell-checker/src/js/typo.js"
|
||||||
},
|
},
|
||||||
"browserify-shim": {
|
"browserify-shim": {
|
||||||
"spell-checker": {
|
"spell-checker": {
|
||||||
"depends": [
|
"depends": [
|
||||||
"typo:Typo",
|
"typo:Typo",
|
||||||
"codemirror:CodeMirror"
|
"codemirror:CodeMirror"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"typo": {
|
"typo": {
|
||||||
"exports": "Typo"
|
"exports": "Typo"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor"
|
"url": "https://github.com/NextStepWebs/simplemde-markdown-editor"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user