How do I modify this mathjax example to preview during input? Now it displays the result only after I hit enter. I would like to configure it so that it works the same way as stackoverflow / math.stackexchange shows a preview when entering a question.
<html> <head> <title>MathJax Dynamic Math Test Page</title> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["$","$"],["\\(","\\)"]] } }); </script> <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full"> </script> </head> <body> <script> </script> Type some TeX code: <input id="MathInput" size="50" onchange="UpdateMath(this.value)" /> <p> <div id="MathOutput"> You typed: ${}$ </div> </body> </html>
javascript jquery mathjax
Mark
source share