mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-31 03:11:02 +02:00
Linkify emote tiles
This commit is contained in:
parent
58907e5842
commit
85748c09cf
@ -29,7 +29,7 @@ module.exports = React.createClass({
|
|||||||
var content = mxEvent.getContent();
|
var content = mxEvent.getContent();
|
||||||
var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
|
var name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
|
||||||
return (
|
return (
|
||||||
<span className="mx_MEmoteTile mx_MessageTile_content">
|
<span ref="content" className="mx_MEmoteTile mx_MessageTile_content">
|
||||||
* {name} {content.body}
|
* {name} {content.body}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -16,6 +16,15 @@ limitations under the License.
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
var linkify = require('linkifyjs');
|
||||||
|
var linkifyElement = require('linkifyjs/element');
|
||||||
|
var linkifyMatrix = require('../../linkify-matrix');
|
||||||
|
|
||||||
|
linkifyMatrix(linkify);
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
componentDidMount: function() {
|
||||||
|
linkifyElement(this.refs.content.getDOMNode(), linkifyMatrix.options);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user