TinyMCE replacing visual content

80 Views Asked by At

I have built an interface for creating math equations and want to implement it in tinymce. At MathType I have seen that they can insert the equation as mathml but then when expecting the DOMElements one sees that they insert an Image with base64/xml as source that represents the equation while preserving the mathml in a data-attribute (I suppose for later editing). Now I want to build something similar that 1. replaces mathml on load and 2. replaces mathml on insert of a new equation.

My Question: How can I replace nodes so that they are changed visually but when I save the document or inspect it in the code editor it still shows the original mathml instead of the img?

0

There are 0 best solutions below