Move typesetMath into the mathmleditor plugin