In out spring MVC project I have integrated wiris MathType with ckeditor for math and chemical equations. Integration is done smoothly and quickly.
Upon data creation I am able to get MathML xml from ckeditor and saving it into database. To edit data I am loading the data from database and binding it to textarea so that user can modify the equation.
Problem is when the page is opened to edit the data the equation is not getting parsed, it looks like ckeditor is removing all the MathML xml and shows only data of the equation.
I am init. ckeditor with wiris plugin as below:
CKEDITOR.plugins.addExternal('ckeditor_wiris', 'https://www.wiris.net/demo/plugins/ckeditor/', 'plugin.js');
CKEDITOR.editorConfig = function (config)
{
config.toolbar = [
{name: 'wirisplugins', items: ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_formulaEditorChemistry']}
];
config.allowedContent = true;
};
CKEDITOR.replace( 'mathml', {extraPlugins: 'ckeditor_wiris'} );
I have also created a jsfiddle here https://jsfiddle.net/vgr47y8n/2/ to demonstrate the problem.
Expected output is: MathML assigned to textarea should get parsed into math equation.
What I am doing wrong?