Skip to content

Commit

Permalink
fix: 优化cherry-markdown快捷键 ctrl+s进行保存 (#969)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzhenping authored Jul 23, 2024
1 parent 1a98d15 commit cd9667b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions static/js/cherry_markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,13 @@ $(function () {
}
$("#documentTemplateModal").modal('hide');
});

document.addEventListener('keydown', function(event) {
if (event.ctrlKey && event.key === 's') {
event.preventDefault();
saveDocument(true, null);
}
});
});

function myFileUpload(file, callback) {
Expand Down

0 comments on commit cd9667b

Please sign in to comment.