MDL-43856 MathJax: Improvements to the MathJax filter
* Remove all traces of mathjax from the atto equation editor - it is filter agnostic * Add a M.core.event module for core events that can be published/subscribed to by plugins (loose coupling) * Add a FILTER_CONTENT_UPDATED event so plugins can tell the filter system when nodes are added to the page * Implement a listener for this event in the MathJax filter * Fire this event from the equation editor and from the glossary filter * Add a nolink tag to the mathjax filter, so equations will not be processed by the other filters * Add a smarter throttle function to the equation editor preview updates (Y.throttle is dumb)
This commit is contained in:
@@ -44,6 +44,12 @@ if ($ADMIN->fulltree) {
|
||||
PARAM_RAW);
|
||||
$settings->add($item);
|
||||
|
||||
$item = new admin_setting_configcheckbox('filter_mathjaxloader/texfiltercompatibility',
|
||||
new lang_string('texfiltercompatibility', 'filter_mathjaxloader'),
|
||||
new lang_string('texfiltercompatibility_help', 'filter_mathjaxloader'),
|
||||
0);
|
||||
$settings->add($item);
|
||||
|
||||
$default = '
|
||||
MathJax.Hub.Config({
|
||||
config: ["MMLorHTML.js", "Safe.js"],
|
||||
@@ -58,19 +64,6 @@ MathJax.Hub.Config({
|
||||
mpMouse: true
|
||||
},
|
||||
errorSettings: { message: ["!"] },
|
||||
tex2jax: {
|
||||
skipTags: ["script","noscript","style","textarea"],
|
||||
inlineMath: [
|
||||
["\\\\(","\\\\)"],
|
||||
["$$","$$"],
|
||||
["\\\\[","\\\\]"]
|
||||
],
|
||||
displayMath: [
|
||||
["[tex]","[/tex]"],
|
||||
],
|
||||
balanceBraces: true,
|
||||
preview: "TeX"
|
||||
},
|
||||
skipStartupTypeset: true,
|
||||
messageStyle: "none"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user