KindEditor-编辑器设置图标的显示隐藏

来源:互联网 发布:上海同济大学网络教育 编辑:程序博客网 时间:2024/05/25 01:36

KindEditor-编辑器怎样实现它的图标显示跟隐藏了,最近做了一个项目,用到了这个编辑器,突然想有些功能自己用不到,为什么不删除这些图标了,但是因为自己之前没有用过,所以一直无法下手,但是我考虑到,他里面这么多的js,我估计是加载在js里面的,所以我就赶紧去查看js里面的源码,果不其然让我找到了里面的写法。现将隐藏图标的方式分享出来。

1:找到KindEditor这个根目录下面的全部js。

2:找到kindeditor-all.js

3:修改

K.options = {
 designMode : true,
 fullscreenMode : false,
 filterMode : true,
 wellFormatMode : true,
 shadowMode : true,
 loadStyleMode : true,
 basePath : K.basePath,
 themesPath : K.basePath + 'themes/',
 langPath : K.basePath + 'lang/',
 pluginsPath : K.basePath + 'plugins/',
 themeType : 'default',
 langType : 'zh_CN',
 urlType : '',
 newlineTag : 'p',
 resizeType : 2,
 syncType : 'form',
 pasteType : 2,
 dialogAlignType : 'page',
 useContextmenu : true,
 fullscreenShortcut : false,
 bodyClass : 'ke-content',
 indentChar : '\t',
 cssPath : '',
 cssData : '',
 minWidth : 650,
 minHeight : 100,
 minChangeSize : 50,
 zIndex : 811213,
 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','|', 'about'
 ],

里面的items想怎么修改都成,删了也行,注释也行。

4:如果不行,可以将kindeditor.js里面的代码换车一摸一样,肯定就是可以的了。

原创粉丝点击