Enable MathJax for live preview.

This commit is contained in:
bootstraponline
2012-06-19 11:58:09 -06:00
parent 4b02b74d6f
commit a8ce7e93cd
2 changed files with 2 additions and 0 deletions
@@ -37,5 +37,6 @@ var require = {
<script src="js/jquery/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/debounce/jquery.ba-throttle-debounce.js" type="text/javascript" charset="utf-8"></script>
<script src="js/livepreview/livepreview.js" type="text/javascript" charset="utf-8"></script>
<script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript" charset="utf-8"></script>
</body>
</html>
@@ -242,6 +242,7 @@ var makePreviewHtml = function () {
// Update the text using feature detection to support IE.
// preview.innerHTML = text; // this doesn't work on IE.
previewSet( text );
MathJax.Hub.Typeset( content );
// highlight code blocks.
var codeElements = preview.getElementsByTagName( 'pre' );