numbas / editor

An editor for the Numbas e-learning system.
http://numbas.mathcentre.ac.uk
Apache License 2.0
59 stars 61 forks source link

Show a warning when a content area contains pasted MathJax output #762

Open christianp opened 1 year ago

christianp commented 1 year ago

MathJax uses id attributes on its output to identify expressions that it's typesetting, with a counter that increments from 0 after the page loads. So if you paste output from a previous run into a content area, MathJax will eventually get to the same id attribute as it processes TeX in the page, and throw an error when it finds the pasted element instead of the one it's just created.

The editor should detect elements with MathJax attributes, starting with MathJax-, and show a warning.

christianp commented 1 year ago

This is really the same thing as #648.