cben / CodeMirror-MathJax

Experimenting to replace $math$ with formulas inside CodeMirror
http://cben.github.io/CodeMirror-MathJax/demo.html
Other
20 stars 3 forks source link

Update math style when context changes #12

Open cben opened 11 years ago

cben commented 11 years ago

When a formula is created it's typest according to the surrounding style (big in headers, colored in lists/quotations etc. But when edits affect the style far down from the changed area (e.g. prepend/remove > at start of long parapraph), formulas are not re-rendered.

Fixing this might be unwise (performance-wise) until caching is implemented. Ideally, should use Rerender() API to re-generate DOM with new styles/measurements without re-parsing latex.