+1
Аяқталған

CTRL + S for Saving

Cole 8 year бұрын жаңартылды 8 year бұрын 6
Being able to ctrl+s save is a luxury but it can make the editor feel nicer for those that instinctively press ctrl+s to save their text (especially when I forget that I am typing into a browser)

A javascript demonstration:
JSfiddle jQuery Example
This uses the keydown event from jQuery as opposed to the keypress event

I am using Chrome v25 as my web browser

Other Ideas:
CTRL + Tab for switching tabs right (Not tested)
CTRL + Shift + Tab for switching tabs left (Not tested)
Cole,

In the new editor you should be able to CMD+S/CTRL+S to save and CMD+E/CTRL+E to snapshot.

If that isn't working then let me know and I will have someone look at it.
This does not work using Google Chrome on Windows 7 or Windows 8.
CTRL + D for delete line works though. But Google chrome overrides the CTRL+S implementation by asking if I wish to save the webpage.
The demonstrative jsFiddle works for both Windows 7 + 8 with google chrome. provided you focus on the Result box by clicking on it. Then proceeding to CTRL+S
Ok cool. I will have someone take a look. Thanks for the heads up.
You have an e.preventDefault in the js of your header but it might be a different event according to Chrome

// Keyboard shortcuts
$(window).keydown(function(e) {
if (e.metaKey) {
// e - snapshot
if (e.keyCode == 69) {
$('#fsnapshot a').trigger('click');
e.preventDefault();
return false;
}
// s - save
else if (e.keyCode == 83) {
window.editor_app.save();
e.preventDefault();
return false;
}
// o - toggle file manager
else if (e.keyCode == 79) {
var showing = false;
if ($('#fileManager').is(':hidden')) {
showing = true;
}
$('#finderTag').trigger('click');
if (showing) {
$('.elfinder-cwd-view-icons').focus();
}
e.preventDefault();
return false;
}
}
});

Ran out of time to write more but:
changing e.metaKey -> e.ctrlKey might work