最近公司需要做一个带公式的HTML编辑器,网上找了很多插件都不是很满意,然后看到一个kindeditor集成jmeditor公式的,感觉还不错,下面是集成后的效果!
避免大家都踩坑,下面记录一下详细集成步骤:
1.下载kindeditor和jmeditor
kindeditor V4.1.11 官网下载地址: http://kindeditor.net/down.php
kindeditor V4.1.12 github下载地址:https://github.com/kindsoft/kindeditor
解压完目录如下:
jmeditor V0.9.4下载 http://www.jmeditor.com/bbs/read.php?tid=57&fid=2
解压完目录如下:
2.复制JMEditor-0.9.4\jmeditor\ckeditor\plugins\jme文件夹 到 kindeditor-4.1.12/plugins/,如下图:
3.然后再复制JMEditor-0.9.4\jmeditor\mathquill-0.9.1文件夹到 kindeditor-4.1.12/plugins/ jme/,如下图:
4.修改kindeditor-4.1.12/kindeditor-all.js。添加jme
items : [
'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
'anchor', 'link', 'unlink', '|', 'jme', 'about'
],