save on ctrl+s

This commit is contained in:
2018-11-30 20:34:57 +01:00
parent 3f6a801c30
commit 389fd02f08
2 changed files with 10 additions and 4 deletions

View File

@@ -10,7 +10,13 @@
self.tmp('saving', false);
oEditor = new Editor('#edi_write');
oEditor.onKeyStroke = save;
oEditor.onKeyStroke = (e) => {
if(e.which == 83 && e.ctrlKey) {
e.preventDefault();
save(true);
}
else save();
}
oEditor.moveToPage('last');
};