|
|
|
@ -15875,7 +15875,7 @@ var Action = function () {
|
|
|
|
|
|
|
|
|
|
// Hide side by side if needed
|
|
|
|
|
var sidebyside = cm.getWrapperElement().nextSibling;
|
|
|
|
|
if (/editor-preview-active-side/.test(sidebyside.className)) this.toggleSideBySide(editor);
|
|
|
|
|
if (/editor-preview-active-side/.test(sidebyside.className)) Action.toggleSideBySide(editor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -15899,7 +15899,7 @@ var Action = function () {
|
|
|
|
|
// give some time for the transition from editor.css to fire and the view to slide from right to left,
|
|
|
|
|
// instead of just appearing.
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
if (!cm.getOption("fullScreen")) this.toggleFullScreen(editor);
|
|
|
|
|
if (!cm.getOption("fullScreen")) Action.toggleFullScreen(editor);
|
|
|
|
|
preview.className += " editor-preview-active-side";
|
|
|
|
|
}, 1);
|
|
|
|
|
toolbarButton.className += " active";
|
|
|
|
@ -15975,7 +15975,7 @@ var Action = function () {
|
|
|
|
|
|
|
|
|
|
// Turn off side by side if needed
|
|
|
|
|
var sidebyside = cm.getWrapperElement().nextSibling;
|
|
|
|
|
if (/editor-preview-active-side/.test(sidebyside.className)) this.toggleSideBySide(editor);
|
|
|
|
|
if (/editor-preview-active-side/.test(sidebyside.className)) Action.toggleSideBySide(editor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -16425,6 +16425,30 @@ CodeMirror.commands.shiftTabAndUnindentMarkdownList = function (cm) {
|
|
|
|
|
},{"codemirror":10}],22:[function(require,module,exports){
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
|
|
|
|
|
* Created by WittBulter on 2017/1/17.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _simplemde = require("./simplemde");
|
|
|
|
|
|
|
|
|
|
var _simplemde2 = _interopRequireDefault(_simplemde);
|
|
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
if ((typeof module === "undefined" ? "undefined" : _typeof(module)) === "object") return module.exports = _simplemde2.default;
|
|
|
|
|
|
|
|
|
|
if (typeof define === "function" && define.amd) define('SimpleMDE', [], function () {
|
|
|
|
|
return _simplemde2.default;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
window.SimpleMDE = _simplemde2.default;
|
|
|
|
|
})();
|
|
|
|
|
|
|
|
|
|
},{"./simplemde":24}],23:[function(require,module,exports){
|
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
@ -16671,13 +16695,12 @@ var promptTexts = exports.promptTexts = {
|
|
|
|
|
image: "URL of the image:"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
},{"./action":19}],23:[function(require,module,exports){
|
|
|
|
|
},{"./action":19}],24:[function(require,module,exports){
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
|
value: true
|
|
|
|
|
});
|
|
|
|
|
exports.SimpleMDE = undefined;
|
|
|
|
|
|
|
|
|
|
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
|
|
|
|
|
|
|
@ -16786,7 +16809,7 @@ var createTootlip = function createTootlip(title, action, shortcuts) {
|
|
|
|
|
* Interface of SimpleMDE.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
var SimpleMDE = exports.SimpleMDE = function (_Action) {
|
|
|
|
|
var SimpleMDE = function (_Action) {
|
|
|
|
|
_inherits(SimpleMDE, _Action);
|
|
|
|
|
|
|
|
|
|
function SimpleMDE() {
|
|
|
|
@ -16839,35 +16862,14 @@ var SimpleMDE = exports.SimpleMDE = function (_Action) {
|
|
|
|
|
options.toolbar = [];
|
|
|
|
|
|
|
|
|
|
// Loop over the built in buttons, to get the preferred order
|
|
|
|
|
var _iteratorNormalCompletion = true;
|
|
|
|
|
var _didIteratorError = false;
|
|
|
|
|
var _iteratorError = undefined;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
for (var _iterator = _metadata.toolbarBuiltInButtons[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
|
|
|
var key = _step.value;
|
|
|
|
|
|
|
|
|
|
if (_metadata.toolbarBuiltInButtons.hasOwnProperty(key)) {
|
|
|
|
|
if (key.indexOf("separator-") != -1) {
|
|
|
|
|
options.toolbar.push("|");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_metadata.toolbarBuiltInButtons[key].default === true || options.showIcons && options.showIcons.constructor === Array && options.showIcons.indexOf(key) != -1) {
|
|
|
|
|
options.toolbar.push(key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
_didIteratorError = true;
|
|
|
|
|
_iteratorError = err;
|
|
|
|
|
} finally {
|
|
|
|
|
try {
|
|
|
|
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
|
|
|
_iterator.return();
|
|
|
|
|
for (var key in _metadata.toolbarBuiltInButtons) {
|
|
|
|
|
if (_metadata.toolbarBuiltInButtons.hasOwnProperty(key)) {
|
|
|
|
|
if (key.indexOf("separator-") != -1) {
|
|
|
|
|
options.toolbar.push("|");
|
|
|
|
|
}
|
|
|
|
|
} finally {
|
|
|
|
|
if (_didIteratorError) {
|
|
|
|
|
throw _iteratorError;
|
|
|
|
|
|
|
|
|
|
if (_metadata.toolbarBuiltInButtons[key].default === true || options.showIcons && options.showIcons.constructor === Array && options.showIcons.indexOf(key) != -1) {
|
|
|
|
|
options.toolbar.push(key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -16973,35 +16975,14 @@ var SimpleMDE = exports.SimpleMDE = function (_Action) {
|
|
|
|
|
var self = this;
|
|
|
|
|
var keyMaps = {};
|
|
|
|
|
|
|
|
|
|
var _iteratorNormalCompletion2 = true;
|
|
|
|
|
var _didIteratorError2 = false;
|
|
|
|
|
var _iteratorError2 = undefined;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
for (var _iterator2 = options.shortcuts[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
|
|
|
var key = _step2.value;
|
|
|
|
|
|
|
|
|
|
// null stands for "do not bind this command"
|
|
|
|
|
if (options.shortcuts[key] !== null && _metadata.bindings[key] !== null) {
|
|
|
|
|
(function (key) {
|
|
|
|
|
keyMaps[_utils2.default.fixShortcut(options.shortcuts[key])] = function () {
|
|
|
|
|
_metadata.bindings[key](self);
|
|
|
|
|
};
|
|
|
|
|
})(key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
_didIteratorError2 = true;
|
|
|
|
|
_iteratorError2 = err;
|
|
|
|
|
} finally {
|
|
|
|
|
try {
|
|
|
|
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
|
|
|
_iterator2.return();
|
|
|
|
|
}
|
|
|
|
|
} finally {
|
|
|
|
|
if (_didIteratorError2) {
|
|
|
|
|
throw _iteratorError2;
|
|
|
|
|
}
|
|
|
|
|
for (var key in options.shortcuts) {
|
|
|
|
|
// null stands for "do not bind this command"
|
|
|
|
|
if (options.shortcuts[key] !== null && _metadata.bindings[key] !== null) {
|
|
|
|
|
(function (key) {
|
|
|
|
|
keyMaps[_utils2.default.fixShortcut(options.shortcuts[key])] = function () {
|
|
|
|
|
_metadata.bindings[key](self);
|
|
|
|
|
};
|
|
|
|
|
})(key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -17279,36 +17260,15 @@ var SimpleMDE = exports.SimpleMDE = function (_Action) {
|
|
|
|
|
cm.on("cursorActivity", function () {
|
|
|
|
|
var stat = _base2.default.getState(cm);
|
|
|
|
|
|
|
|
|
|
var _iteratorNormalCompletion3 = true;
|
|
|
|
|
var _didIteratorError3 = false;
|
|
|
|
|
var _iteratorError3 = undefined;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
for (var _iterator3 = toolbarData[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
|
|
|
var key = _step3.value;
|
|
|
|
|
|
|
|
|
|
(function (key) {
|
|
|
|
|
var el = toolbarData[key];
|
|
|
|
|
if (stat[key]) {
|
|
|
|
|
el.className += " active";
|
|
|
|
|
} else if (key != "fullscreen" && key != "side-by-side") {
|
|
|
|
|
el.className = el.className.replace(/\s*active\s*/g, "");
|
|
|
|
|
}
|
|
|
|
|
})(key);
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
_didIteratorError3 = true;
|
|
|
|
|
_iteratorError3 = err;
|
|
|
|
|
} finally {
|
|
|
|
|
try {
|
|
|
|
|
if (!_iteratorNormalCompletion3 && _iterator3.return) {
|
|
|
|
|
_iterator3.return();
|
|
|
|
|
for (var key in toolbarData) {
|
|
|
|
|
(function (key) {
|
|
|
|
|
var el = toolbarData[key];
|
|
|
|
|
if (stat[key]) {
|
|
|
|
|
el.className += " active";
|
|
|
|
|
} else if (key != "fullscreen" && key != "side-by-side") {
|
|
|
|
|
el.className = el.className.replace(/\s*active\s*/g, "");
|
|
|
|
|
}
|
|
|
|
|
} finally {
|
|
|
|
|
if (_didIteratorError3) {
|
|
|
|
|
throw _iteratorError3;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})(key);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -17618,7 +17578,9 @@ var SimpleMDE = exports.SimpleMDE = function (_Action) {
|
|
|
|
|
return SimpleMDE;
|
|
|
|
|
}(_action2.default);
|
|
|
|
|
|
|
|
|
|
},{"./action":19,"./base":20,"./codemirror/tablist":21,"./metadata":22,"./utils":24,"codemirror":10,"codemirror-spell-checker":4,"codemirror/addon/display/fullscreen":5,"codemirror/addon/display/placeholder":6,"codemirror/addon/edit/continuelist":7,"codemirror/addon/mode/overlay":8,"codemirror/addon/selection/mark-selection":9,"codemirror/mode/gfm/gfm":11,"codemirror/mode/markdown/markdown":12,"codemirror/mode/xml/xml":14,"marked":17}],24:[function(require,module,exports){
|
|
|
|
|
exports.default = SimpleMDE;
|
|
|
|
|
|
|
|
|
|
},{"./action":19,"./base":20,"./codemirror/tablist":21,"./metadata":23,"./utils":25,"codemirror":10,"codemirror-spell-checker":4,"codemirror/addon/display/fullscreen":5,"codemirror/addon/display/placeholder":6,"codemirror/addon/edit/continuelist":7,"codemirror/addon/mode/overlay":8,"codemirror/addon/selection/mark-selection":9,"codemirror/mode/gfm/gfm":11,"codemirror/mode/markdown/markdown":12,"codemirror/mode/xml/xml":14,"marked":17}],25:[function(require,module,exports){
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
@ -17677,33 +17639,11 @@ exports.default = new (function () {
|
|
|
|
|
}, {
|
|
|
|
|
key: 'getBindingName',
|
|
|
|
|
value: function getBindingName(f) {
|
|
|
|
|
var _iteratorNormalCompletion = true;
|
|
|
|
|
var _didIteratorError = false;
|
|
|
|
|
var _iteratorError = undefined;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
for (var _iterator = _metadata.bindings[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
|
|
|
var key = _step.value;
|
|
|
|
|
|
|
|
|
|
if (_metadata.bindings[key] === f) {
|
|
|
|
|
return key;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (err) {
|
|
|
|
|
_didIteratorError = true;
|
|
|
|
|
_iteratorError = err;
|
|
|
|
|
} finally {
|
|
|
|
|
try {
|
|
|
|
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
|
|
|
_iterator.return();
|
|
|
|
|
}
|
|
|
|
|
} finally {
|
|
|
|
|
if (_didIteratorError) {
|
|
|
|
|
throw _iteratorError;
|
|
|
|
|
}
|
|
|
|
|
for (var key in _metadata.bindings) {
|
|
|
|
|
if (_metadata.bindings[key] === f) {
|
|
|
|
|
return key;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
@ -17741,5 +17681,5 @@ exports.default = new (function () {
|
|
|
|
|
return Utils;
|
|
|
|
|
}())();
|
|
|
|
|
|
|
|
|
|
},{"./metadata":22}]},{},[23])(23)
|
|
|
|
|
},{"./metadata":23}]},{},[22])(22)
|
|
|
|
|
});
|