Merge branch pull/1915 Fixed hotkeys for changing font size
This commit is contained in:
commit
3631e7f720
1 changed files with 3 additions and 3 deletions
|
|
@ -184,21 +184,21 @@ env.editor.commands.addCommands([{
|
|||
}
|
||||
}, {
|
||||
name: "increaseFontSize",
|
||||
bindKey: "Ctrl-+",
|
||||
bindKey: "Ctrl-=|Ctrl-+",
|
||||
exec: function(editor) {
|
||||
var size = parseInt(editor.getFontSize(), 10) || 12;
|
||||
editor.setFontSize(size + 1);
|
||||
}
|
||||
}, {
|
||||
name: "decreaseFontSize",
|
||||
bindKey: "Ctrl+-",
|
||||
bindKey: "Ctrl+-|Ctrl-_",
|
||||
exec: function(editor) {
|
||||
var size = parseInt(editor.getFontSize(), 10) || 12;
|
||||
editor.setFontSize(Math.max(size - 1 || 1));
|
||||
}
|
||||
}, {
|
||||
name: "resetFontSize",
|
||||
bindKey: "Ctrl+0",
|
||||
bindKey: "Ctrl+0|Ctrl-Numpad0",
|
||||
exec: function(editor) {
|
||||
editor.setFontSize(12);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue