aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/wiki/new.tmpl
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-12-04 10:11:34 +0800
committerGitHub <noreply@github.com>2024-12-04 02:11:34 +0000
commitc9e582c6b6cbc7beae66d24b05be6e1d338aa81b (patch)
treee2212df009376c6bde41296232e414b2388b8ae5 /templates/repo/wiki/new.tmpl
parent2f43536c3eb6ba20e43521f5539df8372f225652 (diff)
downloadgitea-c9e582c6b6cbc7beae66d24b05be6e1d338aa81b.tar.gz
gitea-c9e582c6b6cbc7beae66d24b05be6e1d338aa81b.zip
Refactor markdown editor and use it for milestone description editor (#32688)
Refactor markdown editor to clarify its "preview" behavior and remove jQuery code. Close #15045 --------- Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'templates/repo/wiki/new.tmpl')
-rw-r--r--templates/repo/wiki/new.tmpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl
index 0f10e60c4f..ea2913c0fd 100644
--- a/templates/repo/wiki/new.tmpl
+++ b/templates/repo/wiki/new.tmpl
@@ -23,12 +23,12 @@
{{$content = ctx.Locale.Tr "repo.wiki.welcome"}}
{{end}}
{{template "shared/combomarkdowneditor" (dict
- "MarkdownPreviewUrl" (print .Repository.Link "/markup")
- "MarkdownPreviewContext" .RepoLink
+ "CustomInit" true
+ "MarkdownPreviewInRepo" $.Repository
+ "MarkdownPreviewMode" "wiki"
"TextareaName" "content"
- "TextareaPlaceholder" (ctx.Locale.Tr "repo.wiki.page_content")
- "TextareaAriaLabel" (ctx.Locale.Tr "repo.wiki.page_content")
"TextareaContent" $content
+ "TextareaPlaceholder" (ctx.Locale.Tr "repo.wiki.page_content")
)}}
<div class="field tw-mt-4">