Skip to content

Commit

Permalink
client,server: Implement shortcut for toggle classic editor toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Nov 9, 2024
1 parent f88d322 commit 8c69d47
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ const TPL = `\
*/
export default class ClassicEditorToolbar extends NoteContextAwareWidget {
get name() {
return "classicToolbar";
return "classicEditor";
}

get toggleCommand() {
return "toggleRibbonTabClassicEditor";
}

doRender() {
Expand Down
6 changes: 6 additions & 0 deletions src/services/keyboard_actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ function getDefaultKeyboardActions() {
separator: t("keyboard_actions.ribbon-tabs")
},

{
actionName: "toggleRibbonTabClassicEditor",
defaultShortcuts: [],
description: t("keyboard_actions.toggle-classic-editor-toolbar"),
scope: "window"
},
{
actionName: "toggleRibbonTabBasicProperties",
defaultShortcuts: [],
Expand Down
3 changes: 2 additions & 1 deletion translations/en/server.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
"copy-without-formatting": "Copy selected text without formatting",
"force-save-revision": "Force creating / saving new note revision of the active note",
"show-help": "Shows built-in Help / cheatsheet",
"toggle-book-properties": "Toggle Book Properties"
"toggle-book-properties": "Toggle Book Properties",
"toggle-classic-editor-toolbar": "Toggle the Formatting tab for the classic editor"
},
"login": {
"title": "Login",
Expand Down

0 comments on commit 8c69d47

Please sign in to comment.