Merge branch 'pull-75'

pull/83/merge
Jeroen Akkerman 5 years ago
commit aa0304fdaa

@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
<!--## [Unreleased]--> ## [Unreleased]
### Fixed
- Keyboard shortcuts for custom actions not working (Thanks to [@ysykzheng], [#75]).
## [2.6.0] - 2019-04-15 ## [2.6.0] - 2019-04-15
### Added ### Added
- Contributing guide (Thanks to [@roipoussiere], [#54]). - Contributing guide (Thanks to [@roipoussiere], [#54]).
@ -107,12 +110,14 @@ Project forked from [SimpleMDE](https://github.com/sparksuite/simplemde-markdown
[#9]: https://github.com/Ionaru/easy-markdown-editor/issues/9 [#9]: https://github.com/Ionaru/easy-markdown-editor/issues/9
<!-- Linked PRs --> <!-- Linked PRs -->
[#75]: https://github.com/Ionaru/easy-markdown-editor/pull/75
[#54]: https://github.com/Ionaru/easy-markdown-editor/pull/54 [#54]: https://github.com/Ionaru/easy-markdown-editor/pull/54
[#31]: https://github.com/Ionaru/easy-markdown-editor/pull/31 [#31]: https://github.com/Ionaru/easy-markdown-editor/pull/31
[#27]: https://github.com/Ionaru/easy-markdown-editor/pull/27 [#27]: https://github.com/Ionaru/easy-markdown-editor/pull/27
[#19]: https://github.com/Ionaru/easy-markdown-editor/pull/19 [#19]: https://github.com/Ionaru/easy-markdown-editor/pull/19
<!-- Linked users --> <!-- Linked users -->
[@ysykzheng]: https://github.com/ysykzheng
[@roipoussiere]: https://github.com/roipoussiere [@roipoussiere]: https://github.com/roipoussiere
[@FranklinWhale]: https://github.com/FranklinWhale [@FranklinWhale]: https://github.com/FranklinWhale
[@Furgas]: https://github.com/Furgas [@Furgas]: https://github.com/Furgas

@ -1561,7 +1561,12 @@ EasyMDE.prototype.render = function (el) {
if (options.shortcuts[key] !== null && bindings[key] !== null) { if (options.shortcuts[key] !== null && bindings[key] !== null) {
(function (key) { (function (key) {
keyMaps[fixShortcut(options.shortcuts[key])] = function () { 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); })(key);
} }
@ -2130,6 +2135,7 @@ EasyMDE.prototype.isPreviewActive = function () {
return /editor-preview-active/.test(preview.className); return /editor-preview-active/.test(preview.className);
}; };
EasyMDE.prototype.isSideBySideActive = function () { EasyMDE.prototype.isSideBySideActive = function () {
var cm = this.codemirror; var cm = this.codemirror;
var wrapper = cm.getWrapperElement(); var wrapper = cm.getWrapperElement();

Loading…
Cancel
Save