0 616 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的开发应用中,标题作为文章的主体往往需要表意明显才能获得更好的...
很多用惯了织梦CMS的朋友在用帝国以后就会非常困惑,因为织梦CMS他的栏目是有...
在网站运营的过程中,由于业务的变更或是优化的需要,可能需要修改网站的标题,关...
现如今,许多商家通过机器批量给网站发留言,一条两条还可以接受,有的商家却是拼...
如果直接在帝国cms模板中插入360推送代码,会发现在插入360推送代码后,无法正...
我们知道,帝国cms的日期可以根据需要调用问多种格式,如x年x月x日、年-月-日、...
那么,我们要怎样在图片路径不完善的时候正常在手机端显示图片呢?...
下载鸥开发了这款帝国cms封禁ip插件,自动记录访问情况,让我们可以更快的识别...
一直没看到好用的帝国cms在线考试插件,所以自己开发了一款。在线考试插件用...
本插件基于帝国cms帝国cms每日自动审核插件,在自动审核指定条数信息的基础上...
通过本插件,可以实现帝国cms网站对接百度云api实现图像清晰度增强的功能。经...
使用帝国cms的企业用户、新闻资讯类站点的用户很多,此类站点很多时候需要有...
通过本插件,可以实现帝国cms网站对接百度云api实现图像去雾的功能。经过实际...
通过本插件,可以实现帝国cms网站对接百度云api实现图像无损放大的功能。经过...
用户体验是我们的需求,百度蜘蛛的认可更是我们的需求。毕竟,没有收录排名,何来...