diff options
author | Florian Orben <florian.orben@gmail.com> | 2015-12-01 00:37:00 +0100 |
---|---|---|
committer | Florian Orben <florian.orben@gmail.com> | 2015-12-01 22:41:06 +0100 |
commit | c111777f85fc93ab18c6e28473e70c9ed2810683 (patch) | |
tree | 90b86627f7679529395b496a7b76c84f9f7bbea1 /web/react/utils/emoticons.jsx | |
parent | 2b2ee62a1df0504fff3f3e0e59966db1cd297531 (diff) | |
download | chat-c111777f85fc93ab18c6e28473e70c9ed2810683.tar.gz chat-c111777f85fc93ab18c6e28473e70c9ed2810683.tar.bz2 chat-c111777f85fc93ab18c6e28473e70c9ed2810683.zip |
Allow to switch between default and emoji-one emoji style
Diffstat (limited to 'web/react/utils/emoticons.jsx')
-rw-r--r-- | web/react/utils/emoticons.jsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/web/react/utils/emoticons.jsx b/web/react/utils/emoticons.jsx index bb948b6dc..6a8ba6984 100644 --- a/web/react/utils/emoticons.jsx +++ b/web/react/utils/emoticons.jsx @@ -1,6 +1,8 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. +import * as Utils from './utils.jsx'; + const emoticonPatterns = { smile: /(^|\s)(:-?\))(?=$|\s)/g, // :) wink: /(^|\s)(;-?\))(?=$|\s)/g, // ;) @@ -133,7 +135,7 @@ export function handleEmoticons(text, tokens) { const alias = `MM_EMOTICON${index}`; tokens.set(alias, { - value: `<img align="absmiddle" alt="${matchText}" class="emoji" src="${getImagePathForEmoticon(name)}" title="${matchText}" />`, + value: `<img align="absmiddle" alt="${matchText}" class="emoji" src="${Utils.getImagePathForEmoticon(name)}" title="${matchText}" />`, originalText: fullMatch }); @@ -154,6 +156,3 @@ export function handleEmoticons(text, tokens) { return output; } -function getImagePathForEmoticon(name) { - return `/static/images/emoji/${name}.png`; -} |