mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Linkify URLs
This commit is contained in:
parent
0daab63b4a
commit
a00510c1ca
@ -26,7 +26,8 @@
|
||||
"matrix-js-sdk": "0.1.1",
|
||||
"q": "^1.4.1",
|
||||
"react": "^0.13.0",
|
||||
"react-loader": "^1.4.0"
|
||||
"react-loader": "^1.4.0",
|
||||
"linkifyjs": "^2.0.0-beta.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"catw": "^1.0.1",
|
||||
|
@ -27,7 +27,7 @@ module.exports = React.createClass({
|
||||
render: function() {
|
||||
var content = this.props.mxEvent.getContent();
|
||||
return (
|
||||
<span className="mx_MNoticeTile mx_messageTileType">
|
||||
<span ref="content" className="mx_MNoticeTile mx_messageTileType">
|
||||
{content.body}
|
||||
</span>
|
||||
);
|
||||
|
@ -27,7 +27,7 @@ module.exports = React.createClass({
|
||||
render: function() {
|
||||
var content = this.props.mxEvent.getContent();
|
||||
return (
|
||||
<span className="mx_MTextTile mx_messageTileType">
|
||||
<span ref="content" className="mx_MTextTile mx_messageTileType">
|
||||
{content.body}
|
||||
</span>
|
||||
);
|
||||
|
@ -16,5 +16,10 @@ limitations under the License.
|
||||
|
||||
'use strict';
|
||||
|
||||
var linkifyElement = require('linkifyjs/element');
|
||||
|
||||
module.exports = {
|
||||
componentDidMount: function() {
|
||||
linkifyElement(this.refs.content.getDOMNode());
|
||||
}
|
||||
};
|
||||
|
@ -16,6 +16,11 @@ limitations under the License.
|
||||
|
||||
'use strict';
|
||||
|
||||
var linkifyElement = require('linkifyjs/element');
|
||||
|
||||
module.exports = {
|
||||
componentDidMount: function() {
|
||||
linkifyElement(this.refs.content.getDOMNode());
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user