Renders input from a textbox using custom MathJax directive