diff options
-rw-r--r-- | templates/repo/wiki/new.tmpl | 2 | ||||
-rw-r--r-- | web_src/js/index.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index 276ea54f3a..002a36de96 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -21,7 +21,7 @@ <a class="item" data-tab="preview">{{.i18n.Tr "preview"}}</a> </div> <div class="field"> - <textarea class="js-quick-submit" id="edit_area" name="content" data-id="wiki-{{.title}}" data-url="{{.Repository.APIURL}}/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="{{.Repository.APIURL}}/markdown" data-context="{{.RepoLink}}" 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"}}"> diff --git a/web_src/js/index.js b/web_src/js/index.js index 46b0425014..553948bb36 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1323,7 +1323,8 @@ function initWikiForm() { _csrf: csrf, mode: 'gfm', context: $editArea.data('context'), - text: plainText + text: plainText, + wiki: true }, (data) => { preview.innerHTML = `<div class="markdown ui segment">${data}</div>`; $(preview).find('pre code').each((_, e) => { |