summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-05-13 20:19:20 +0000
committerTom Needham <needham.thomas@gmail.com>2012-05-13 20:19:20 +0000
commit21dfe9dc5e5b2fed3fb9f135136c73efa9ce4a8d (patch)
treed9fa16e7885952b7f94c5ac23dc0c0a3166c3cb3 /apps
parent3ce6eca40ab83270338778986dc9550c81b86187 (diff)
downloadnextcloud-server-21dfe9dc5e5b2fed3fb9f135136c73efa9ce4a8d.tar.gz
nextcloud-server-21dfe9dc5e5b2fed3fb9f135136c73efa9ce4a8d.zip
Fixed keyboard shortcut for saving files. Thanks adlr in #ace!
Diffstat (limited to 'apps')
-rw-r--r--apps/files_texteditor/js/editor.js4
1 files changed, 4 insertions, 0 deletions
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.