about summary refs log tree commit diff
path: root/app/assets/javascripts/components
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-08 21:45:51 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-08 21:46:29 +0100
commit86574ea5248219fa35ecb0748920df9ff1ce6110 (patch)
treec9d0499dff42bb4fd6afb5a6691245f6030354da /app/assets/javascripts/components
parentb6832553ff023164cce2dd01889155aa9be216bf (diff)
Adding Emoji One
Diffstat (limited to 'app/assets/javascripts/components')
-rw-r--r--app/assets/javascripts/components/components/status_content.jsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/components/status_content.jsx b/app/assets/javascripts/components/components/status_content.jsx
index 67fd9cb69..a6321d31c 100644
--- a/app/assets/javascripts/components/components/status_content.jsx
+++ b/app/assets/javascripts/components/components/status_content.jsx
@@ -1,5 +1,10 @@
 import ImmutablePropTypes from 'react-immutable-proptypes';
-import PureRenderMixin    from 'react-addons-pure-render-mixin';
+import PureRenderMixin from 'react-addons-pure-render-mixin';
+import emojione from 'emojione';
+
+emojione.imageType = 'png';
+emojione.sprites = false;
+emojione.imagePathPNG = '/emoji/';
 
 const StatusContent = React.createClass({
 
@@ -55,7 +60,7 @@ const StatusContent = React.createClass({
   },
 
   render () {
-    const content = { __html: this.props.status.get('content') };
+    const content = { __html: emojione.unicodeToImage(this.props.status.get('content')) };
     return <div className='status__content' dangerouslySetInnerHTML={content} />;
   },