Skip to content

Commit

Permalink
Added Remove Formatting shortcut key
Browse files Browse the repository at this point in the history
  • Loading branch information
klaudiosinani committed Sep 9, 2017
1 parent 14cdc83 commit 9c8d397
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ ipc.on('superscript', () => {
document.querySelector('#gwt-debug-FormattingBar-superscriptButton').click();
});

ipc.on('remove-formatting', () => {
// Remove text formatting
document.querySelector('#gwt-debug-FormattingBar-noFormatButton').click();
});

ipc.on('horizontal-rule', () => {
// Insert horizontal rule
document.querySelector('#gwt-debug-FormattingBar-horizontalRuleButton').click();
Expand Down
12 changes: 12 additions & 0 deletions menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,12 @@ const darwinTpl = [{
}
}, {
type: 'separator'
}, {
label: 'Remove Formatting',
accelerator: 'CmdorCtrl+Shift+Space',
click() {
activate('remove-formatting');
}
}, {
label: 'Insert Horizontal Rule',
accelerator: 'CmdorCtrl+Shift+-',
Expand Down Expand Up @@ -773,6 +779,12 @@ const otherTpl = [{
}
}, {
type: 'separator'
}, {
label: 'Remove Formatting',
accelerator: 'CmdorCtrl+Shift+Space',
click() {
activate('remove-formatting');
}
}, {
label: 'Insert Horizontal Rule',
accelerator: 'CmdorCtrl+Shift+-',
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Bulleted List | <kbd>Cmd/Ctrl</kbd> <kbd>Shift</kbd> <kbd>.</kbd>
Subscript Text | <kbd>Cmd/Ctrl</kbd> <kbd>Shift</kbd> <kbd>]</kbd>
Superscript Text | <kbd>Cmd/Ctrl</kbd> <kbd>Shift</kbd> <kbd>[</kbd>
Insert Horizontal Rule | <kbd>Cmd/Ctrl</kbd> <kbd>Shift</kbd> <kbd>-</kbd>
Remove Formatting | <kbd>Cmd/Ctrl</kbd> <kbd>Shift</kbd> <kbd>Space</kbd>

## Upcoming Features

Expand Down

0 comments on commit 9c8d397

Please sign in to comment.