Thank you for the tip on "Remove()" function to remove major HTML part.
Now I can remove the script element as I know the content and I know
its ID (mathelms[i].inputID).
Also I can remove the span with "MathJax_Preview" class.
DIV with id "MathJax_Message" can be removed.
Still I have few elements.
<div style="visibility: hidden; overflow: hidden; position: absolute;
top: 0pt; height: 1px; width: auto; padding: 0pt; border: 0pt none;
margin: 0pt; text-align: left; text-indent: 0pt; text-transform: none;
line-height: normal; letter-spacing: normal; word-spacing: normal;">
<div id="MathJax_Hidden"></div>
</div>
This is little complected but can be removed.
There should be a better way to remove the entire MathJax from a
document.
I am actually building a simple HTML editor for our internal use. Most of my content are derived from an XML file. This html has got few Math equations in TeX format. Earlier I did not provide Math Editing capability in my editor and math was displayed as images . So after content editing the user will press a “SAVE” button that will save the html. The saved html will be similar to my source html except that it will have additional changes made by the user.
Recently I try to give Math editing capability and I am using Mathjax for viewing the TeX equations. Once I include the MathJax javascript it adds lots content. Hence on saving I am getting those additional content. Hence my original request on how to remove the content. I don’t care as long as it is in the browser but I need original html for saving and further processing.
Somehow I have managed to remove the additional content using JQuery and DOM. I was just wondering if there are any “easy” way of removing the MathJax content.
RegardsMathJax isn't designed to be removed, and it does include a number of elements in the page (as you have found). These include stylesheets in the <head> as well as a number of hidden elements in the <body>.Can you be more specific about what you are really trying to do? Why can't you just make a copy of the innerHTML before MathJax runs and inserts its content? That would be a lot easier than trying to unravel the changes that it makes.
Build a patch if you want to stop the joke. 😤
--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.