jmnote / SimpleMathJax

MediaWiki Extension SimpleMathJax
https://www.mediawiki.org/wiki/Extension:SimpleMathJax
MIT License
30 stars 23 forks source link

un-rendered [math] block remains visible after editing page with VisualEditor #29

Closed hexmode closed 3 years ago

hexmode commented 3 years ago

When using VisualEditor to render the page, the math block's rendering is changed to image

This is fine, since VE provides the user with a dialog to edit the math if they click on the box.

After saving the page, whether the math is changed or not, the un-rendered grey box of TeX-formatted math remains.

SimpleMathJax should use whatever methods it can (I imagine there is a VE hook somewhere) to re-render the math after a page save.

jmnote commented 3 years ago

I'm trying to setup VisualEditor. Can you tell me your configurations (mediawiki version, parsoid, restbase)?

ClausGra commented 3 years ago

Hi, I can confirm the mentioned behaviour.

We are using:

And I configured:

# SimpleMathJax
wfLoadExtension( 'SimpleMathJax' );
$wgSmjShowMathManu = true;
$wgSmjUseCDN = false;

Best regards Claus

jmnote commented 3 years ago

@ClausGra Thanks for your information! @hexmode You're right. We need a re-render trigger. So, I tried like this. I hope it works on your wiki too. https://github.com/jmnote/SimpleMathJax/commit/99f32fbc30ad02cc2cc1408c32cad3676e1d43d9

jmnote commented 3 years ago

resolved. https://zetawiki.com/wiki/SimpleMathJax_issue_test