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