message-edit: Avoid hardcoding maxlength for message_edit_form.

This commit is contained in:
jai2201 2022-07-15 06:35:53 +05:30 committed by Tim Abbott
parent 3853a65a4c
commit 97ffeb0b7e
2 changed files with 2 additions and 1 deletions

View File

@ -452,6 +452,7 @@ function edit_message($row, raw_content) {
notify_new_thread: notify_new_thread_default,
notify_old_thread: notify_old_thread_default,
giphy_enabled: giphy.is_giphy_enabled(),
max_message_length: page_params.max_message_length,
}),
);

View File

@ -41,7 +41,7 @@
<div class="control-group no-margin">
<div class="controls edit-controls">
{{> copy_message_button message_id=this.message_id}}
<textarea class="message_edit_content" maxlength="10000">{{content}}</textarea>
<textarea class="message_edit_content" maxlength="{{ max_message_length }}">{{content}}</textarea>
<div class="scrolling_list preview_message_area" id="preview_message_area_{{message_id}}" style="display:none;">
<div class="markdown_preview_spinner"></div>
<div class="preview_content rendered_markdown"></div>