From: Tom Needham Date: Sun, 13 May 2012 20:19:20 +0000 (+0000) Subject: Fixed keyboard shortcut for saving files. Thanks adlr in #ace! X-Git-Tag: v4.0.0RC2~86 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=21dfe9dc5e5b2fed3fb9f135136c73efa9ce4a8d;p=nextcloud-server.git Fixed keyboard shortcut for saving files. Thanks adlr in #ace! --- diff --git a/apps/files_texteditor/js/editor.js b/apps/files_texteditor/js/editor.js index e1e348e28ac..9d168c1c4f6 100644 --- a/apps/files_texteditor/js/editor.js +++ b/apps/files_texteditor/js/editor.js @@ -221,6 +221,10 @@ function showFileEditor(dir,filename){ document.title = $('#editor').attr('data-filename')+' * - ownCloud'; } }); + // Add the ctrl+s event + window.aceEditor.commands.addCommand({ name: "save", bindKey: { win: "Ctrl-S", mac: "Command-S", sender: "editor" }, exec: function(){ + doFileSave(); + } }); }); } else { // Failed to get the file.