diff options
author | Michael Kuhn <suraia@ikkoku.de> | 2018-07-24 12:20:52 +0200 |
---|---|---|
committer | Jonas Franz <info@jonasfranz.software> | 2018-07-24 12:20:52 +0200 |
commit | 344dc07239301194fa4220a27ce4dd24396cf25c (patch) | |
tree | fc85d8808469dc90383d5a57cf78e46f0d1a167e /public/js | |
parent | ba358ecbf5d58dc6b2f166a84a4b6c6633cfa397 (diff) | |
download | gitea-344dc07239301194fa4220a27ce4dd24396cf25c.tar.gz gitea-344dc07239301194fa4220a27ce4dd24396cf25c.zip |
Add shortcut to save wiki page (#4452)
This allows saving the wiki page with Ctrl-Enter.
Diffstat (limited to 'public/js')
-rw-r--r-- | public/js/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js index 696b63e778..5f4a7bc774 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -790,7 +790,7 @@ function initTeamSettings() { function initWikiForm() { var $editArea = $('.repository.wiki textarea#edit_area'); if ($editArea.length > 0) { - new SimpleMDE({ + var simplemde = new SimpleMDE({ autoDownloadFontAwesome: false, element: $editArea[0], forceSync: true, @@ -825,6 +825,7 @@ function initWikiForm() { "link", "image", "table", "horizontal-rule", "|", "clean-block", "preview", "fullscreen"] }) + $(simplemde.codemirror.getInputField()).addClass("js-quick-submit"); } } |