PHP使用 ckeditor4 编辑器插入 mathtype数学公式插件

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.

如果实在不行,先清除下缓存,我就是在这遇到的问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值