Skip to content

Commit

Permalink
Merge pull request #12 from mrded/patch-1
Browse files Browse the repository at this point in the history
Hiding content until typesetting is complete
  • Loading branch information
calvinkei authored Sep 8, 2018
2 parents 9634906 + 249a66e commit a0e233c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ class MathJax extends React.Component {
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script type="text/x-mathjax-config">
MathJax.Hub.Config(${options});
MathJax.Hub.Queue(function() {
document.getElementById("formula").style.visibility = '';
});
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js"></script>
${content}
<div id="formula" style="visibility: hidden;">
${content}
</div>
`;
}
render() {
Expand Down

0 comments on commit a0e233c

Please sign in to comment.