1. 解压缩CKEditor MathType集成并将ckeditor_wiris
目录复制到CKEditor集成目录中。例如,你将拥有ckeditor/plugins/ckeditor_wiris
。必须是MathType集成目录的名称ckeditor_wiris
。
2.
mbstring
必须在服务器中安装和启用扩展。
在包含在的PHP文件上为Web服务器用户授予执行权限ckeditor/plugins/ckeditor_wiris/integration
。
为ckeditor/plugins/ckeditor_wiris/
缓存和ckeditor/plugins/ckeditor_wiris/formulas
目录提供对Web服务器用户的写入权限。这些文件夹将用于存储公式MathML代码和时间图像。如果您愿意,可以配置这些文件夹的位置。
3.
//MathType注册插件 config.extraPlugins+=(config.extraPlugins.length == 0 ? '' : ',') + 'ckeditor_wiris'; config.allowedContent = true; config.height = '250px';
4.
config.toolbarGroups = [ { name: 'clipboard', groups: [ 'clipboard', 'undo'] }, { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] }, { name: 'links' }, { name: 'insert' }, { name: 'forms' }, { name: 'tools' }, { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, { name: 'others' }, '/', { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, { name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] }, { name: 'styles' }, { name: 'colors' }, { name: 'about' },
//红色文字是我新添加的,这是数学公式的俩个按钮,这个是必须的 { name: 'wiris', groups:['ckeditor_wiris_formulaEditor','ckeditor_wiris_formulaEditorChemistry']}
];
5.
如果实在不行,先清除下缓存,我就是在这遇到的问题