diff options
author | mrsdizzie <info@mrsdizzie.com> | 2020-05-24 06:41:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 11:41:33 +0100 |
commit | ae55dc7a6ba9c08c4a8e0750acf89f9ad3fabffb (patch) | |
tree | 05da207d167e29d796f440b5dd9fdda866dbc004 /web_src | |
parent | 814ca9ffea229f55f1f69b34d9a7f84054115669 (diff) | |
download | gitea-ae55dc7a6ba9c08c4a8e0750acf89f9ad3fabffb.tar.gz gitea-ae55dc7a6ba9c08c4a8e0750acf89f9ad3fabffb.zip |
Fix images in wiki edit preview (#11546)
Make sure wiki editor sets wiki to true so gitea renders it as a wiki page.
Also change the context data attr for edit form. This looks wrong but everywhere else in our code assumes the urlPrefix to be just the repo url when rendering and manually adds /wiki to the rendered url regardless.
Fixes #11540
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
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) => { |