我制作了mathjax编辑器,并成功完成了Mathjax转换。
但我试过保存DB文本.....例如,我的截图
我想在DB中保存此文本。
所以javascript var txt = ~~ .innerHTML但是..
<span class="MathJax_Preview"></span>
this is
<span class="MathJax" id="MathJax-Element-1-Frame" tabindex="-1">
<nobr>
<span class="math" id="MathJax-Span-1" role="math" style="width: 1.158em; display: inline-block;">
<span style="display: inline-block; position: relative; width: 0.948em; height: 0px; font-size: 119%;">
<span style="position: absolute; clip: rect(0.003em 1000.95em 1.158em -999.997em); top: -0.995em; left: 0.003em;">
<span class="mrow" id="MathJax-Span-2">
<span class="msubsup" id="MathJax-Span-3">
<span style="display: inline-block; position: relative; width: 0.948em; height: 0px;">
<span style="position: absolute; clip: rect(3.416em 1000.53em 4.152em -999.997em); top: -3.989em; left: 0.003em;">
<span class="mi" id="MathJax-Span-4" style="font-family: MathJax_Math-italic;">a</span>
<span style="display: inline-block; width: 0px; height: 3.994em;"></span>
</span>
<span style="position: absolute; top: -4.357em; left: 0.528em;">
<span class="mn" id="MathJax-Span-5" style="font-size: 70.7%; font-family: MathJax_Main;">2</span>
<span style="display: inline-block; width: 0px; height: 3.994em;"></span>
</span>
</span>
</span>
</span>
<span style="display: inline-block; width: 0px; height: 1.001em;"></span>
</span>
</span>
<span style="display: inline-block; overflow: hidden; vertical-align: -0.059em; border-left: 0px solid; width: 0px; height: 1.128em;"></span>
</span>
</nobr>
</span>
<script type="math/tex" id="MathJax-Element-1">
a^2
</script>
不是一个非常漂亮的DB文本。
我想要DB文本 - &gt;这是$ a ^ 2 $(Mathjax texcode)