Skip to content

Commit

Permalink
fix: 优化cherry-markdown快捷键 ctrl+s进行保存
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzhenping committed Jul 22, 2024
1 parent 1a98d15 commit bec147d
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 bec147d

Please sign in to comment.