forked from forgejo/forgejo
Improve markdown editor: width, height, preferred (#23895)
Follow #23876 1. Fine tune the heights of the editors (like before) * Auto expand the editor (increase/decrease the height) when editing 2. Remember user's last used editor (textarea/easymde) in LocalStorage, then next time the editor will be switched automatically * No need to introduce extra config option, it satisfies all users, including who prefer EasyMDE 3. Also fix the width problem of Review Panel Screenshot: <details>       </details> --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
97d5ec2aeb
commit
93eb914438
7 changed files with 203 additions and 55 deletions
|
@ -3,14 +3,17 @@
|
|||
{{if not $textareaContent}}{{$textareaContent = .PullRequestTemplate}}{{end}}
|
||||
{{if not $textareaContent}}{{$textareaContent = .content}}{{end}}
|
||||
|
||||
{{template "shared/combomarkdowneditor" (dict
|
||||
"locale" $.locale
|
||||
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
||||
"MarkdownPreviewContext" .RepoLink
|
||||
"TextareaName" "content"
|
||||
"TextareaContent" $textareaContent
|
||||
"DropzoneParentContainer" "form, .ui.form"
|
||||
)}}
|
||||
<div class="field">
|
||||
{{template "shared/combomarkdowneditor" (dict
|
||||
"locale" $.locale
|
||||
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
|
||||
"MarkdownPreviewContext" .RepoLink
|
||||
"TextareaName" "content"
|
||||
"TextareaContent" $textareaContent
|
||||
"TextareaPlaceholder" ($.locale.Tr "repo.diff.comment.placeholder")
|
||||
"DropzoneParentContainer" "form, .ui.form"
|
||||
)}}
|
||||
</div>
|
||||
|
||||
{{if .IsAttachmentEnabled}}
|
||||
<div class="field">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue