Linkify emote tiles

This commit is contained in:
David Baker 2015-07-19 10:43:16 +01:00
parent 58907e5842
commit 85748c09cf
2 changed files with 10 additions and 1 deletions

View File

@ -29,7 +29,7 @@ module.exports = React.createClass({
var content = mxEvent.getContent();
var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
return (
<span className="mx_MEmoteTile mx_MessageTile_content">
<span ref="content" className="mx_MEmoteTile mx_MessageTile_content">
* {name} {content.body}
</span>
);

View File

@ -16,6 +16,15 @@ limitations under the License.
'use strict';
var linkify = require('linkifyjs');
var linkifyElement = require('linkifyjs/element');
var linkifyMatrix = require('../../linkify-matrix');
linkifyMatrix(linkify);
module.exports = {
componentDidMount: function() {
linkifyElement(this.refs.content.getDOMNode(), linkifyMatrix.options);
}
};