import React from 'react'; import PropTypes from 'prop-types'; // TODO refactor import { PreviewOptions } from '../PageEditor/OptionsSelector'; export default class RevisionBody extends React.Component { constructor(props) { super(props); } componentDidMount() { if (this.props.isMathJaxEnabled && this.props.renderMathJaxOnInit) { this.renderMathJax(); } } componentDidUpdate() { if (this.props.isMathJaxEnabled && this.props.renderMathJaxInRealtime) { this.renderMathJax(); } } renderMathJax() { const MathJax = window.MathJax; if (MathJax != null) { MathJax.Hub.Queue(["Typeset", MathJax.Hub, this.element]); } } generateInnerHtml(html) { return {__html: html}; } render() { return (