From bec147d25b9a76d7e0472a8827d2d320e419e1c0 Mon Sep 17 00:00:00 2001 From: zhanzhenping <128675240+Zzhenping@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:33:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96cherry-markdown?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=20ctrl+s=E8=BF=9B=E8=A1=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/cherry_markdown.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static/js/cherry_markdown.js b/static/js/cherry_markdown.js index 276ba595..de1b33cb 100644 --- a/static/js/cherry_markdown.js +++ b/static/js/cherry_markdown.js @@ -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) {