Explorar el Código

WIP: render page with react component

fix mathjax rendering trigger
Yuki Takei hace 8 años
padre
commit
accc674097
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      resource/js/components/Page/RevisionBody.js

+ 6 - 0
resource/js/components/Page/RevisionBody.js

@@ -24,6 +24,12 @@ export default class RevisionBody extends React.Component {
     }
   }
 
+  componentWillReceiveProps(nextProps) {
+    if (MathJax != null && this.props.isMathJaxEnabled && this.props.renderMathJaxOnInit) {
+      this.renderMathJax();
+    }
+  }
+
   renderMathJax() {
     MathJax.Hub.Queue(["Typeset", MathJax.Hub, this.element]);
   }