MathJax
MathJax copied to clipboard
can "reset to defaults" be hooked into?
Is there a way to also execute custom code when the user selects the "Reset to Defaults" menu item?
Here is a configuration that you can use to hook into the reset menu:
MathJax = {
startup: {
ready() {
MathJax.startup.defaultReady();
const reset = MathJax.startup.document.menu.menu.find('Reset');
reset.registerCallback((item) => {
// your actions here ("item" will just be the same as "reset" in this case)
});
}
}
};
This will run after all the other items that have been registered.