Allow submitting comment with ctrl+enter

Fixes #427
This commit is contained in:
rubenwardy
2023-08-26 13:38:34 +01:00
parent 798679ca44
commit 8f52c67f0f
6 changed files with 21 additions and 11 deletions

View File

@@ -11,7 +11,7 @@
<form method="POST" action="" enctype="multipart/form-data">
{{ form.hidden_tag() }}
{{ render_field(form.comment, label="", class_="m-0", fieldclass="form-control markdown") }} <br />
{{ render_submit_field(form.submit) }}
{{ render_field(form.comment, label="", class_="m-0", fieldclass="form-control markdown", data_enter_submit="1") }} <br />
{{ render_submit_field(form.btn_submit) }}
</form>
{% endblock %}

View File

@@ -29,7 +29,7 @@
<a name="reply"></a>
</div>
<div class="card-body">
{{ render_field(form.comment, label="", class_="m-0", fieldclass="form-control markdown") }}
{{ render_field(form.comment, label="", class_="m-0", fieldclass="form-control markdown", data_enter_submit="1") }}
</div>
</div>
</div>
@@ -48,7 +48,7 @@
</p>
{% endif %}
{{ render_submit_field(form.submit) }}
{{ render_submit_field(form.btn_submit) }}
</form>