0 667 2021-01-25 18:32:05
收藏
https://ckeditor.com/cke4/addon/
Code Snippet
widget
lineutils
widgetselection
修改配置文件
配置文件路径:
/e/admin/ecmseditor/infoeditor/config.js
配置文件中共有两个工具条,一个是全功能的,一个是精简的
在两个工具条中添加代码工具CodeSnippet
然后在工具条下方添加代码工具的配置
这里我把我的发上来供大家参考
CKEDITOR.editorConfig=function(config){
//Definechangestodefaultconfigurationhere.Forexample:
//config.language='fr';
//config.uiColor='#AADC6E';
config.filebrowserImageUploadUrl='';
config.filebrowserFlashUploadUrl=arraycs[0];
config.filebrowserImageBrowseUrl=arraycs[1];
config.filebrowserFlashBrowseUrl=arraycs[1];
config.enterMode=CKEDITOR.ENTER_BR;
config.shiftEnterMode=CKEDITOR.ENTER_P;
config.allowedContent=true;
config.font_names='宋体/宋体;黑体/黑体;仿宋/仿宋_GB2312;楷体/楷体_GB2312;隶书/隶书;幼圆/幼圆;微软雅黑/微软雅黑;'+config.font_names;
//Toolbar
config.toolbar_full=[
{name:'document',groups:['mode','document','doctools'],items:['Source','-','Preview','Print']},
{name:'clipboard',groups:['clipboard','undo'],items:['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']},
{name:'paragraph',groups:['list','indent','blocks','align','bidi'],items:['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},
'/',
{name:'basicstyles',groups:['basicstyles','cleanup'],items:['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat','ecleanalltext','autoformat']},
{name:'links',items:['Link','Unlink','Anchor']},
{name:'insert',items:['Image','etranmore','Flash','etranmedia','etranfile','-','Table','HorizontalRule','SpecialChar','CodeSnippet','equotetext','einserttime','einsertpage','einsertbr']},
'/',
{name:'styles',items:['Styles','Format','Font','FontSize']},
{name:'colors',items:['TextColor','BGColor']},
{name:'tools',items:['ShowBlocks','NewPage','Templates']},
{name:'others',items:['-']},
{name:'editing',groups:['find','selection','spellchecker'],items:['Find','Replace','-','SelectAll','Maximize']}
];
//Toolbar
config.toolbar_basic=[
{name:'document',groups:['mode','document','doctools'],items:['Source']},
{name:'clipboard',groups:['clipboard','undo'],items:['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']},
{name:'links',items:['Link','Unlink','Anchor']},
{name:'insert',items:['Image','Table','HorizontalRule','SpecialChar','CodeSnippet']},
{name:'tools',items:['Maximize']},
{name:'others',items:['-']},
'/',
{name:'basicstyles',groups:['basicstyles','cleanup'],items:['Bold','Italic','Strike','-','RemoveFormat']},
{name:'paragraph',groups:['list','indent','blocks','align','bidi'],items:['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote']},
{name:'styles',items:['Styles','Format']},
];
config.extraPlugins='etranfile,etranmedia,etranmore,autoformat,ecleanalltext,einsertbr,einsertpage,einserttime,equotetext';
config.extraPlugins='codesnippet';
config.codeSnippet_theme='monokai_sublime';
config.toolbar='full';
}; 本文地址:https://xzo.com.cn/develop/empire/178.html

如果您认可我们的分享,有意与我们合作开展帝国cms网站建设与开发业务或插件定制,请联系右侧在线客服。我们能给您的,就是高质量的模板与售后。
标注了信息来源为下载鸥的文章皆为原创,如果是转载的优质文章,我们也都标注了出处。如果您喜欢我们的文章,请按照下载鸥所标注的文章出处进行标注,谢谢您的配合。

帝国cms是一款功能极为强大的cms程序,性能强悍、安全性高,可轻松支持10万数据,高级开发人员可制作出能容纳千万数据量的网站,是国内最出色的开源cms程序之一,推荐企业用户使用。
当前最新版本为7.5,8.0版本即将上线,新版本的核心优化点在于多终端的适配。
帝国CMS一级栏目和二级栏目使用同一个模板,二级栏目是终极栏目,调用本栏目数...
今天有客户向鸥哥求助说宝塔面板帝国cms搬家报错No input file specified,这...
部分功能型站点需要验证访客ip,如非白名单ip需要禁止访问。从动态站点的角度...
帝国cms是带有远程保存图片、图片加水印功能的,但都是默认未勾选的状态,我们...
帝国CMS安装报错 fatal error:require():Failed opening required ../clas...
如果能将手里的资源合并,会员渠道打通,则用起来更加舒服。而帝国CMS自带的会...
帝国CMS提供了强大的碎片功能,其位置位于【栏目】-》【碎片管理】-》【管理...
帝国cms怎样提取正文里的3张图片做缩略图呢?...
帝国cms有自带的给关键词添加内链功能,但需要手动添加关键词,容易出现疏漏和...
百度开放了系列AI功能api如图像上色、图像去雾、图像修复、无损放大、清晰...
使用帝国cms的企业用户、新闻资讯类站点的用户很多,此类站点很多时候需要有...
用户体验是我们的需求,百度蜘蛛的认可更是我们的需求。毕竟,没有收录排名,何来...
本插件适用于内网用户,可查看单篇文章访问者ip地址。如果添加访问者ip组,可查...
本插件基于帝国cms帝国cms每日自动审核插件,在自动审核指定条数信息的基础上...
通过本插件,可以实现帝国cms网站对接百度云api实现图像去雾的功能。经过实际...
下载鸥开发了这款帝国cms封禁ip插件,自动记录访问情况,让我们可以更快的识别...