Files
jiang13-forum/templates/post/comment_edit.tmpl
freefire 1f777eebb1 feat: Markdown 工具栏编辑器与服务端预览
共用 md_editor 于发帖/改帖/评论,扩展 ComposeBodyToHTML,并提供 /compose/preview。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 04:50:07 +08:00

32 lines
1.0 KiB
Cheetah

{{define "post/comment_edit"}}
{{template "base/head" .}}
{{template "base/navbar" .}}
<main class="j13-main j13-main--solo">
<h1>编辑评论</h1>
<p class="j13-muted">#{{.Floor}} · <a href="/post/{{.PostID}}#floor-{{.Floor}}">返回帖子</a></p>
{{template "base/alert" .}}
<form method="post" action="/post/{{.PostID}}/comments/{{.CommentID}}/edit" class="j13-form j13-comment-form">
<input type="hidden" name="_csrf" value="{{.CSRF}}"/>
<label for="comment-edit-content">内容</label>
{{template "shared/md_editor" (dict
"Name" "content"
"ID" "comment-edit-content"
"Content" .Content
"Rows" 8
"MaxLength" 8000
"Placeholder" "支持 Markdown"
"CSRF" .CSRF
"ShowGates" 0
"ShowUpload" 1
"Unsaved" 1
"Required" 1
)}}
<div class="j13-form__row">
<button type="submit">保存</button>
<a class="j13-btn-secondary" href="/post/{{.PostID}}#floor-{{.Floor}}">取消</a>
</div>
</form>
</main>
{{template "base/footer" .}}
{{end}}