Commit fa3bfd77 by kimth

Set up mathjax_preprocessor

parent 36b44253
......@@ -6,6 +6,7 @@ class @Problem
@element_id = @el.attr('id')
@url = @el.data('url')
@render()
@mathjax_preprocessor = false
$: (selector) ->
$(selector, @el)
......@@ -300,8 +301,8 @@ class @Problem
if jax = MathJax.Hub.getAllJax(target)[0]
eqn = $(element).val()
if window.mathjax_preprocessor
eqn = window.mathjax_preprocessor(eqn)
if @mathjax_preprocessor
eqn = @mathjax_preprocessor(eqn)
MathJax.Hub.Queue ['Text', jax, eqn],
[@updateMathML, jax, element]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment