diff options
-rw-r--r-- | public/js/index.js | 3 | ||||
-rw-r--r-- | templates/repo/wiki/new.tmpl | 2 |
2 files changed, 3 insertions, 2 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"); } } diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index 34c6b2d0ca..7dc066ffb8 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -17,7 +17,7 @@ <input name="title" value="{{.title}}" autofocus required> </div> <div class="field"> - <textarea id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}/wiki" required>{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea> + <textarea class="js-quick-submit" id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}/wiki" required>{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea> </div> <div class="field"> <input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}"> |