expand post-title field when editing
parent
d95fdcbaaf
commit
5b274c95c9
|
@ -2,10 +2,13 @@ function togglePostEdit(id){
|
|||
body=document.getElementById("post-body");
|
||||
title=document.getElementById("post-title");
|
||||
form=document.getElementById("edit-post-body-"+id);
|
||||
box=document.getElementById("post-edit-box-"+id);
|
||||
|
||||
body.classList.toggle("d-none");
|
||||
title.classList.toggle("d-none");
|
||||
form.classList.toggle("d-none");
|
||||
|
||||
box=document.getElementById("post-edit-box-"+id);
|
||||
autoExpand(box);
|
||||
};
|
||||
box=document.getElementById("post-edit-title");
|
||||
autoExpand(box);
|
||||
};
|
||||
|
|
|
@ -315,7 +315,7 @@
|
|||
<form id="post-edit-form-{{p.id}}" action="/edit_post/{{p.id}}" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<input type="hidden" name="current_page" value="{{request.path}}">
|
||||
<textarea autocomplete="off" max-length="500" name="title" class="comment-box form-control rounded" required placeholder="title">{{p.title}}</textarea>
|
||||
<textarea id="post-edit-title" autocomplete="off" max-length="500" name="title" class="comment-box form-control rounded" required placeholder="title">{{p.title}}</textarea>
|
||||
<textarea autocomplete="off" name="body" {% if v.longpost %}minlength="280"{% endif %} maxlength="{% if v.bird %}140{% else %}20000{% endif %}" data-preview="post-edit-{{p.id}}" oninput="markdown(this);charLimit('post-edit-box-{{p.id}}','charcount-post-edit')" id="post-edit-box-{{p.id}}" form="post-edit-form-{{p.id}}" class="comment-box form-control rounded" aria-label="With textarea" placeholder="Add text to your post..." rows="10" data-id="{{p.id}}">{{p.body}}</textarea>
|
||||
|
||||
<div class="text-small font-weight-bold mt-1" id="charcount-post-edit" style="right: 1rem; bottom: 0.5rem; z-index: 3;"></div>
|
||||
|
|
Loading…
Reference in New Issue