From 91d7be57c3223ee8ed97f26c55058afccb9261f7 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 4 Apr 2019 12:41:24 +0200 Subject: [PATCH] added ctrl +- to editor --- src/app/editor/editor.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/app/editor/editor.js b/src/app/editor/editor.js index 797304dfcf..83fd681783 100644 --- a/src/app/editor/editor.js +++ b/src/app/editor/editor.js @@ -101,6 +101,35 @@ class Editor { // Unmap ctrl-t & ctrl-f 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.resize(true)