Alex-D / Trumbowyg

A lightweight and amazing WYSIWYG JavaScript editor under 10kB
https://alex-d.github.io/Trumbowyg
MIT License
4.02k stars 614 forks source link

Load MathML in editor with mathMLContainer class for making it editable on click #1288

Open bmg02 opened 2 years ago

bmg02 commented 2 years ago

Hey there. I have data in the string which consists of HTML and MathML tags. If I load that string in the editor, it is rendering the math output, but I want to make it editable also when the user clicks on it, the same as when the user creates a math formula using the MathML plugin of Trumbowyg.

String I have: <p><span>Demo is here: </span><math><msqrt>2</msqrt></math></p>

What should I do? Is there any way to achieve this? It would be great if there is a demo available for the same.

Environment: React - 17.0.2 trumbowyg: 2.25.1 react-trumbowyg: 1.1.0