Skip to content

Commit

Permalink
fix: issue #551 (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
YoranBrondsema authored and bantic committed May 25, 2017
1 parent 96350a5 commit 0a09408
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/js/editor/key-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ export const DEFAULT_KEY_COMMANDS = [{
run(editor) {
editor.toggleMarkup('em');
}
}, {
str: 'META+U',
run(editor) {
editor.toggleMarkup('u');
}
}, {
str: 'CTRL+U',
run(editor) {
editor.toggleMarkup('u');
}
}, {
str: 'CTRL+K',
run(editor) {
Expand Down
14 changes: 14 additions & 0 deletions tests/acceptance/editor-key-commands-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,20 @@ testStatefulCommand({
markupName: 'em'
});

testStatefulCommand({
modifierName: 'META',
key: 'U',
command: 'command-U',
markupName: 'u'
});

testStatefulCommand({
modifierName: 'CTRL',
key: 'U',
command: 'ctrl-U',
markupName: 'u'
});

if (Browser.isMac()) {
test(`[Mac] ctrl-k clears to the end of a line`, (assert) => {
let initialText = 'something';
Expand Down

0 comments on commit 0a09408

Please sign in to comment.