summaryrefslogtreecommitdiffstats
path: root/webapp/utils/text_formatting.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils/text_formatting.jsx')
-rw-r--r--webapp/utils/text_formatting.jsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/webapp/utils/text_formatting.jsx b/webapp/utils/text_formatting.jsx
index 88dc412ca..cb61ecc8d 100644
--- a/webapp/utils/text_formatting.jsx
+++ b/webapp/utils/text_formatting.jsx
@@ -7,6 +7,7 @@ import Constants from './constants.jsx';
import * as Emoticons from './emoticons.jsx';
import * as Markdown from './markdown.jsx';
import UserStore from 'stores/user_store.jsx';
+import twemoji from 'twemoji';
import * as Utils from './utils.jsx';
// Performs formatting of user posts including highlighting mentions and search terms and converting urls, hashtags, and
@@ -62,6 +63,14 @@ export function doFormatText(text, options) {
// reinsert tokens with formatted versions of the important words and phrases
output = replaceTokens(output, tokens);
+ if (!('emoticons' in options) || options.emoticon) {
+ output = twemoji.parse(output, {
+ className: 'emoticon',
+ base: '',
+ folder: Constants.EMOJI_PATH
+ });
+ }
+
return output;
}