mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
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>
This commit is contained in:
@@ -18,7 +18,16 @@
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{ctx.Locale.Tr "repo.projects.description"}}</label>
|
||||
<textarea name="content" placeholder="{{ctx.Locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea>
|
||||
{{/* TODO: repo-level project and org-level project have different behaviros to render */}}
|
||||
{{/* the "Repository" is nil when the project is org-level */}}
|
||||
{{template "shared/combomarkdowneditor" (dict
|
||||
"MarkdownPreviewInRepo" $.Repository
|
||||
"MarkdownPreviewContext" (Iif $.Repository "" .HomeLink)
|
||||
"MarkdownPreviewMode" (Iif $.Repository "comment")
|
||||
"TextareaName" "content"
|
||||
"TextareaContent" .content
|
||||
"TextareaPlaceholder" (ctx.Locale.Tr "repo.projects.description_placeholder")
|
||||
)}}
|
||||
</div>
|
||||
|
||||
{{if not .PageIsEditProjects}}
|
||||
|
Reference in New Issue
Block a user