only try to syntax highlight html

This commit is contained in:
Matthew Hodgson 2015-11-21 12:33:45 +00:00
parent 9038b984ff
commit 01641543da
2 changed files with 8 additions and 4 deletions

View File

@ -26,10 +26,12 @@ module.exports = React.createClass({
mixins: [MNoticeTileController],
componentDidMount: function() {
if (this.props.mxEvent.getContent().format === "org.matrix.custom.html")
HtmlUtils.highlightDom(this.getDOMNode());
},
componentDidUpdate: function() {
if (this.props.mxEvent.getContent().format === "org.matrix.custom.html")
HtmlUtils.highlightDom(this.getDOMNode());
},

View File

@ -26,10 +26,12 @@ module.exports = React.createClass({
mixins: [MTextTileController],
componentDidMount: function() {
if (this.props.mxEvent.getContent().format === "org.matrix.custom.html")
HtmlUtils.highlightDom(this.getDOMNode());
},
componentDidUpdate: function() {
if (this.props.mxEvent.getContent().format === "org.matrix.custom.html")
HtmlUtils.highlightDom(this.getDOMNode());
},