mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-02 15:44:28 -06:00
Fixed shortcut code so links are opened as well.
This commit is contained in:
parent
2a0def5fb5
commit
cc0c211759
@ -1561,7 +1561,12 @@ EasyMDE.prototype.render = function (el) {
|
||||
if (options.shortcuts[key] !== null && bindings[key] !== null) {
|
||||
(function (key) {
|
||||
keyMaps[fixShortcut(options.shortcuts[key])] = function () {
|
||||
bindings[key](self);
|
||||
var action = bindings[key];
|
||||
if (typeof action === 'function') {
|
||||
action(self);
|
||||
} else if (typeof action === 'string') {
|
||||
window.open(action, '_blank');
|
||||
}
|
||||
};
|
||||
})(key);
|
||||
}
|
||||
@ -2130,6 +2135,7 @@ EasyMDE.prototype.isPreviewActive = function () {
|
||||
return /editor-preview-active/.test(preview.className);
|
||||
};
|
||||
|
||||
|
||||
EasyMDE.prototype.isSideBySideActive = function () {
|
||||
var cm = this.codemirror;
|
||||
var wrapper = cm.getWrapperElement();
|
||||
|
Loading…
x
Reference in New Issue
Block a user