6 Star 70 Fork 17

hepeichun / CKeditor数学公式编辑器插件_图片版

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
plugin.js 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
CKEDITOR.plugins.add("kityformula", {
icons: 'kityformula', requires: ["dialog"],
init: function(editor) {
editor.addCommand("kityformula", new CKEDITOR.dialogCommand("kityformula"));
editor.ui.addButton("kityformula", {
label: "数学公式",//调用dialog时显示的名称
command: "kityformula",
icon: this.path + "/icons/kityformula.png"//在toolbar中的图标
});
if ( editor.contextMenu ) {
editor.addMenuGroup( 'kityMathGroup' );
editor.addMenuItem( 'mathEditorItem', {
label: '编辑数学公式',
icon: this.path + "/icons/kityformula.png",//在toolbar中的图标
command: 'kityformula',
group: 'kityMathGroup'
});
editor.contextMenu.addListener( function( element ) {
if ( element.getAscendant( 'img', true ) ) {
return { mathEditorItem: CKEDITOR.TRISTATE_OFF };
}
});
}
CKEDITOR.dialog.add("kityformula", this.path + "dialogs/kityformula.js")
}
});
JavaScript
1
https://gitee.com/hepeichun/kityformula.git
git@gitee.com:hepeichun/kityformula.git
hepeichun
kityformula
CKeditor数学公式编辑器插件_图片版
master

搜索帮助