added ctrl +- to editor

pull/1/head
LianaHus 6 years ago
parent d5f65ba5aa
commit b21f844592
  1. 29
      src/app/editor/editor.js

@ -101,6 +101,35 @@ class Editor {
// Unmap ctrl-t & ctrl-f // Unmap ctrl-t & ctrl-f
this.editor.commands.bindKeys({ 'ctrl-t': null }) this.editor.commands.bindKeys({ 'ctrl-t': null })
// shortcuts for "Ctrl-"" and "Ctrl+"" to increase/decrease font size of the editor
this.editor.commands.addCommand({
name: 'increasefontsizeEqual',
bindKey: {win: 'Ctrl-=', mac: 'Command-='},
exec: (editor) => {
this.editorFontSize(1)
},
readOnly: true
})
this.editor.commands.addCommand({
name: 'increasefontsizePlus',
bindKey: {win: 'Ctrl-+', mac: 'Command-+'},
exec: (editor) => {
this.editorFontSize(1)
},
readOnly: true
})
this.editor.commands.addCommand({
name: 'decreasefontsize',
bindKey: {win: 'Ctrl--', mac: 'Command--'},
exec: (editor) => {
this.editorFontSize(-1)
},
readOnly: true
})
this.editor.setShowPrintMargin(false) this.editor.setShowPrintMargin(false)
this.editor.resize(true) this.editor.resize(true)

Loading…
Cancel
Save