Skip to content

Commit 976711e

Browse files
Rick Butterfieldnathanwoulfe
authored andcommitted
Publish hotkey doesn't work in RTE
1 parent f12c449 commit 976711e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@
200200
}
201201
}));
202202

203+
evts.push(eventsService.on("rte.shortcut.publish", function () {
204+
$scope.saveAndPublish();
205+
}));
206+
203207
evts.push(eventsService.on("content.saved", function () {
204208
// Clear out localstorage keys that start with tinymce__
205209
// When we save/perist a content node

src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,12 @@ function tinyMceService($rootScope, $q, imageHelper, $locale, $http, $timeout, s
12211221
});
12221222
});
12231223

1224+
editor.addShortcut('Ctrl+P', '', function () {
1225+
angularHelper.safeApply($rootScope, function () {
1226+
eventsService.emit("rte.shortcut.publish");
1227+
});
1228+
});
1229+
12241230
},
12251231

12261232
insertLinkInEditor: function (editor, target, anchorElm) {

0 commit comments

Comments
 (0)