Skip to content

Commit

Permalink
Publish hotkey doesn't work in RTE
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Butterfield authored and nathanwoulfe committed Oct 27, 2021
1 parent f12c449 commit 976711e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 976711e

Please sign in to comment.