Make Ctrl-S save note in editor
This commit is contained in:
parent
cd476b3f6d
commit
26232618d4
@ -75,6 +75,18 @@ function exiteditor() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(window).bind('keydown', function (event) {
|
||||||
|
if (event.ctrlKey || event.metaKey) {
|
||||||
|
switch (String.fromCharCode(event.which).toLowerCase()) {
|
||||||
|
case 's':
|
||||||
|
event.preventDefault();
|
||||||
|
sync();
|
||||||
|
saveme();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$("#noteframe").on("load", function () {
|
$("#noteframe").on("load", function () {
|
||||||
init();
|
init();
|
||||||
});
|
});
|
@ -63,6 +63,18 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|||||||
"horizontal-rule"
|
"horizontal-rule"
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.addEventListener('keydown', function (event) {
|
||||||
|
if (event.ctrlKey || event.metaKey) {
|
||||||
|
switch (String.fromCharCode(event.which).toLowerCase()) {
|
||||||
|
case 's':
|
||||||
|
event.preventDefault();
|
||||||
|
window.parent.sync();
|
||||||
|
window.parent.saveme();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMarkdown() {
|
function getMarkdown() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user