diff --git a/static/js/compose.js b/static/js/compose.js index fac96ac0b9..13800a64fc 100644 --- a/static/js/compose.js +++ b/static/js/compose.js @@ -652,6 +652,12 @@ exports.initialize = function () { preview_html = rendered_content; } $("#preview_content").html(preview_html); + if (page_params.emoji_alt_code) { + $("#preview_content").find(".emoji").replaceWith(function () { + var text = $(this).attr("title"); + return ":" + text + ":"; + }); + } } $('#compose').on('click', '#video_link', function (e) { diff --git a/static/js/message_list_view.js b/static/js/message_list_view.js index 74a6100657..da2c349c4f 100644 --- a/static/js/message_list_view.js +++ b/static/js/message_list_view.js @@ -424,6 +424,15 @@ MessageListView.prototype = { }); } + // Display emoji (including realm emoji) as text if + // page_params.emoji_alt_code is set + if (page_params.emoji_alt_code) { + row.find(".emoji").replaceWith(function () { + var text = $(this).attr("title"); + return ":" + text + ":"; + }); + } + var id = rows.id(row); message_edit.maybe_show_edit(row, id);