Publish hotkey doesn't work in RTE

This commit is contained in:
Rick Butterfield
2021-10-22 09:52:22 +01:00
committed by Nathan Woulfe
parent f12c4493b3
commit 976711ef1c
2 changed files with 10 additions and 0 deletions

View File

@@ -200,6 +200,10 @@
}
}));
evts.push(eventsService.on("rte.shortcut.publish", function () {
$scope.saveAndPublish();
}));
evts.push(eventsService.on("content.saved", function () {
// Clear out localstorage keys that start with tinymce__
// When we save/perist a content node

View File

@@ -1221,6 +1221,12 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
});
});
editor.addShortcut('Ctrl+P', '', function () {
angularHelper.safeApply($rootScope, function () {
eventsService.emit("rte.shortcut.publish");
});
});
},
insertLinkInEditor: function (editor, target, anchorElm) {