Transform mathquill-rendered-math spans back to images when loading into editor
piacentini opened this issue · 2 comments
piacentini commented
When you get the tinymce.html() contents the plugin transforms the image (used for preview) into mathquill-rendered-math spans. However, the opposite does not happen. So when you store the text in a database or another place and then reload the equation in the plugin, you will not see the preview images and will not be able to edit the equations (they will be loaded as mathquill-rendered-math spans in tinymce).
ASCIIMath plugin apparently toggles between AM and AMEdit spans in the preProcess method of the plugin, for reference.
piacentini commented
There are also ed.onLoadContent, ed.onSetContent and ed.onBeforeSetContent. Maybe these are more appropriate for the transformation.
piacentini commented
I fixed it in master, please check.