ckeditor + wiris MathType 在编辑模式下不解析数学 ml

问题描述

在春季 MVC 项目中,我将 wiris MathType 与用于数学和化学方程式的 ckeditor 集成在一起。整合过程顺利而迅速。

创建数据后,我可以从 ckeditor 获取 MathML xml 并将其保存到数据库中。为了编辑数据,我从数据库加载数据并将其绑定到 textarea,以便用户可以修改方程。

问题是当打开页面编辑数据时,方程没有被解析,看起来 ckeditor 正在删除所有 MathML xml 并只显示方程的数据。

我是初始化。带有 wiris 插件的 ckeditor 如下:

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'} );

我还在 https://jsfiddle.net/vgr47y8n/2/ 处创建了一个 jsfiddle 来演示这个问题。

预期输出是:分配给 textarea 的 MathML 应该被解析为数学方程。

我做错了什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)