Sfoglia il codice sorgente

Fixed shortcut code so links are opened as well.

tags/2.6.1
Jeroen Akkerman 5 mesi fa
parent
commit
cc0c211759
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7
    1
      src/js/easymde.js

+ 7
- 1
src/js/easymde.js Vedi File

@@ -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…
Annulla
Salva