mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
compose: Use a placeholder when quoting and replying.
Use the placeholder `[Quoting…]` when quoting and replying before the quote has been added to the message. Also, add tests to the `compose_actions` Node tests for the new behavior. Fix #10705.
This commit is contained in:
committed by
Tim Abbott
parent
f9d867e138
commit
207d7a8ee6
@@ -390,15 +390,13 @@ exports.quote_and_reply = function (opts) {
|
||||
var message_id = current_msg_list.selected_id();
|
||||
|
||||
exports.respond_to_message(opts);
|
||||
compose_ui.insert_syntax_and_focus("[Quoting…]\n", textarea);
|
||||
|
||||
channel.get({
|
||||
url: '/json/messages/' + message_id,
|
||||
idempotent: true,
|
||||
success: function (data) {
|
||||
if (textarea.val() === "") {
|
||||
textarea.val("```quote\n" + data.raw_content + "\n```\n");
|
||||
} else {
|
||||
textarea.val(textarea.val() + "\n```quote\n" + data.raw_content + "\n```\n");
|
||||
}
|
||||
compose_ui.replace_syntax('[Quoting…]', '```quote\n' + data.raw_content + '\n```', textarea);
|
||||
$("#compose-textarea").trigger("autosize.resize");
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user