This commit makes things with MathJax work a bit better overall
and offers a few key changes.
We no longer will load MathJax when there is a hidden <math>
tag on the page. It only loads if a <math> tag is explicitly
visible.
We also load a combined TeX/MML config so that if there is MML
on the page explicitly and the Advanced Equation Editor opens
it handles all the cases. This was really prevalent potentially
with discussion posts/replies.
Finally, when we explicitly request to load MathML we now always
call the callback if present to make sure any hooks get put in, but
we also tell the existing MathJax instance to reprocess the page
to handle any newly added areas that it needs to handle.
closes CORE-1597
closes CORE-1402
Test Plan:
- Go to a discussion post and do the following:
- Use the advanced equation editor (AEE) to put something in the
description.
- Post a reply to that using the AEE. It should work.
- Explictly use the HTML editor to put MathML code into the
description or a post.
- Open the AEE and insert something.
- It likewise should work :)
Change-Id: I934047c7c6760166d9cdcc495fa96fb3185aa9a8
Reviewed-on: https://gerrit.instructure.com/165453
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>