位置: IT常识 - 正文

织梦dedecms自带文本编辑器ckeditor更换为kindeditor编辑器带代码高亮(将织梦dedecms转换到wordpress)

编辑:rootadmin

推荐整理分享织梦dedecms自带文本编辑器ckeditor更换为kindeditor编辑器带代码高亮(将织梦dedecms转换到wordpress),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:织梦使用教程,织梦cms要钱吗,织梦cms怎么样,织梦cms可以商用吗,织梦cms可以商用吗,将织梦dedecms转换到wordpress,织梦cms怎么样,将织梦dedecms转换到wordpress,内容如对您有帮助,希望把文章链接给更多的朋友!

在kindeditor基础上添加了如下功能

1、qq客服快速添加

2、ckplayer播放器,支持本地flv,mp4

3、动态百度地图

kindeditor织梦版(gbk/utf8)打包下载

云盘下载:http://pan.baidu.com/s/1dF1WKJv密码: vwea

该版本为4.1.10,需要4.1.4版本的请移步《织梦整合编辑器Kindeditor 4.1.4 GBK+UTF一键安装》

下载解压,选择对应的编码版本,把include文件夹上传到网站根目录

最后给dedecms添加kindeditor编辑器调用代码

dedecms utf8编码程序的

打开include/inc/inc_fun_funAdmin.php找到

else {

/*

// ------------------------------------------------------------------------

//当前版本,暂时取消dedehtml编辑器的支持

织梦dedecms自带文本编辑器ckeditor更换为kindeditor编辑器带代码高亮(将织梦dedecms转换到wordpress)

在它的上面加入

elseif($GLOBALS['cfg_html_editor']=='kindeditor'){$fvalue=htmlspecialchars($fvalue);$uploadJson=$GLOBALS['cfg_cmspath']."/include/dialog/kindeditor_post.php";$fileManagerJson=$GLOBALS['cfg_cmspath']."/include/dialog/kindeditor_manager.php";$allowFileManager='true';$extendconfig='';if($etype=='Member'||$etype=='MemberLit'||$etype=='Diy'||$etype=='Feedback'){$uploadJson="";$fileManagerJson="";$allowFileManager='false';$extendconfig='allowImageUpload:false,';$extendconfig.='allowFlashUpload:false,';$extendconfig.='allowMediaUpload:false,';$extendconfig.='allowFileUpload:false,';}$items['Member']="['source','|','undo','redo','|','preview','print','template','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','flash','media','insertfile','table','hr','emoticons','map','pagebreak','link','unlink','|','about']";$items['Small']=$items['MemberLit']=$items['Diy']="['fontname','fontsize','|','forecolor','hilitecolor','bold','italic','underline','removeformat','|','justifyleft','justifycenter','justifyright','insertorderedlist','insertunorderedlist','|','emoticons','image','link']";$items['Feedback']="['fontname','fontsize','|','forecolor','hilitecolor','bold','italic','underline','removeformat','|','justifyleft','justifycenter','justifyright','insertorderedlist','insertunorderedlist','|','emoticons']";$itemconfig='';if(isset($items[$etype])){$itemconfig="items:{$items[$etype]},";}$session_id=session_id();$code=<<<HTML<linkrel="stylesheet"href="{$GLOBALS['cfg_cmspath']}/include/kindeditor/themes/default/default.css"/><linkrel="stylesheet"href="{$GLOBALS['cfg_cmspath']}/include/kindeditor/plugins/code/prettify.css"/><scriptsrc="{$GLOBALS['cfg_cmspath']}/include/kindeditor/kindeditor-min.js"></script><scriptsrc="{$GLOBALS['cfg_cmspath']}/include/kindeditor/lang/zh_CN.js"></script><scriptsrc="{$GLOBALS['cfg_cmspath']}/include/kindeditor/plugins/code/prettify.js"></script><scripttype="text/javascript">KindEditor.ready(function(K){vareditor1=K.create('textarea[name="{$fname}"]',{cssPath:'{$GLOBALS['cfg_cmspath']}/include/kindeditor/plugins/code/prettify.css',uploadJson:'$uploadJson',fileManagerJson:'$fileManagerJson',filterMode:false,//是否开启过滤模式extraFileUploadParams:{PHPSESSID:'{$session_id}'},$extendconfig$itemconfigallowFileManager:{$allowFileManager},afterBlur:function(){this.sync();}});prettyPrint();});</script><textareaname="{$fname}"style="height:{$nheight}px;visibility:hidden;width:100%;">{$fvalue}</textarea>HTML;if($gtype=="print"){echo$code;}else{return$code;}}

dedecms gbk编码程序的

打开include/inc/inc_fun_funAdmin.php找到

else {

/*

// ------------------------------------------------------------------------

//当前版本,暂时取消dedehtml编辑器的支持

在它的上面加入

elseif($GLOBALS['cfg_html_editor']=='kindeditor'){$fvalue=htmlspecialchars($fvalue);$uploadJson=$GLOBALS['cfg_cmspath']."/include/dialog/kindeditor_post.php";$fileManagerJson=$GLOBALS['cfg_cmspath']."/include/dialog/kindeditor_manager.php";$allowFileManager='true';$extendconfig='';if($etype=='Member'||$etype=='MemberLit'||$etype=='Diy'||$etype=='Feedback'){$uploadJson="";$fileManagerJson="";$allowFileManager='false';$extendconfig='allowImageUpload:false,';$extendconfig.='allowFlashUpload:false,';$extendconfig.='allowMediaUpload:false,';$extendconfig.='allowFileUpload:false,';}$items['Member']="['source','|','undo','redo','|','preview','print','template','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','flash','media','insertfile','table','hr','emoticons','map','pagebreak','link','unlink','|','about']";$items['Small']=$items['MemberLit']=$items['Diy']="['fontname','fontsize','|','forecolor','hilitecolor','bold','italic','underline','removeformat','|','justifyleft','justifycenter','justifyright','insertorderedlist','insertunorderedlist','|','emoticons','image','link']";$items['Feedback']="['fontname','fontsize','|','forecolor','hilitecolor','bold','italic','underline','removeformat','|','justifyleft','justifycenter','justifyright','insertorderedlist','insertunorderedlist','|','emoticons']";$itemconfig='';if(isset($items[$etype])){$itemconfig="items:{$items[$etype]},";}$session_id=session_id();$code=<<<HTML<linkrel="stylesheet"href="{$GLOBALS['cfg_cmspath']}/include/kindeditor/themes/default/default.css"/><linkrel="stylesheet"href="{$GLOBALS['cfg_cmspath']}/include/kindeditor/plugins/code/prettify.css"/><scriptsrc="{$GLOBALS['cfg_cmspath']}/include/kindeditor/kindeditor-min.js"charset="gb2312"></script><scriptsrc="{$GLOBALS['cfg_cmspath']}/include/kindeditor/lang/zh_CN.js"charset="gb2312"></script><scriptsrc="{$GLOBALS['cfg_cmspath']}/include/kindeditor/plugins/code/prettify.js"charset="gb2312"></script><scripttype="text/javascript">KindEditor.ready(function(K){vareditor1=K.create('textarea[name="{$fname}"]',{cssPath:'{$GLOBALS['cfg_cmspath']}/include/kindeditor/plugins/code/prettify.css',uploadJson:'$uploadJson',fileManagerJson:'$fileManagerJson',filterMode:false,//是否开启过滤模式extraFileUploadParams:{PHPSESSID:'{$session_id}'},$extendconfig$itemconfigallowFileManager:{$allowFileManager},afterBlur:function(){this.sync();}});prettyPrint();});</script><textareaname="{$fname}"style="height:{$nheight}px;visibility:hidden;width:100%;">{$fvalue}</textarea>HTML;if($gtype=="print"){echo$code;}else{return$code;}}

最后

后台-系统-系统基本参数-核心设置-Html编辑器,填写kindeditor

要实现代码高亮需在前台模板页(比如我的是aricle_aritlce.htm)需引入以下几个文件:

<link type="text/css" rel="stylesheet" href="/include/kindeditor/plugins/code/prettify.css"/>

<script type="text/javascript" src="/include/kindeditor/plugins/code/prettify.js"></script>

然后,在你文章模板页的</body>前添加这一句:

<script>prettyPrint();</script>

注意,一定要放在body的结束符之前,如果在页面头部

本文链接地址:https://www.jiuchutong.com/zhishi/310840.html 转载请保留说明!

上一篇:php之kohana框架的安装详解(php框架symfony)

下一篇:织梦模板DEDECMS数据库分表储存数据负载性能优化(织梦模板安装完整教程)

  • 保险费车船税会计分录
  • 居间费用如何纳税
  • 企业可以找审计人员吗
  • 劳务外包合同需要交税吗
  • 金融商品转让和持有至到期都需要缴纳增值税吗
  • 银行取钱需要签协议吗
  • 房地产企业融资存在的问题
  • 现金折扣净额法税
  • 成本还原有什么作用
  • 网上银行 电子回单
  • pe市盈率法
  • 进项转出后还能转入吗
  • 到账的钱还能退回去吗
  • 分派现金股利会计科目
  • 所得税缴纳计算公式
  • 税收编码选错了,发票已经开出去几个月了,还有影响吗
  • 在固定资产中
  • 非公司员工可以交社保吗
  • 企业做账会计需要什么资质
  • 分支机构能否核定企业所得税
  • 租入固定资产装修
  • 增值税小规模纳税人减免增值税政策
  • 企业为职工缴纳的五险一金占工资总额的多少
  • 小规模纳税人缴纳增值税怎么做账
  • u盘启动器安装系统
  • gif图片查看软件
  • 增值税一般纳税人申报流程
  • 发出商品借方余额120000元
  • linux杀死服务
  • 电脑开机画面都是英文怎么处理
  • linux 数据类型
  • slee401.exe - slee401是什么进程 有什么用
  • 交易性金融资产的入账价值怎么算
  • 特兰西瓦尼亚的统一
  • php自定义函数的关键字是什么
  • 公司报亏损需要交税吗
  • 处理固定资产怎么交税
  • 餐费进什么科目
  • php链表的应用场景
  • 研发部门的房租物业费进什么科目
  • 净收入是营业收入吗
  • 织梦系统基本参数
  • 坏账计提方法会计政策
  • 所得税申报表是什么
  • 小规模企业免征增值税如何申报
  • 应交税费需要结转到本年利润吗
  • 电子承兑汇票的最长期限
  • 资产无偿划转会计处理
  • 技术服务费会计科目
  • 享受残疾人增值服务的是
  • 销售退回怎么办
  • 个人咨询费发票怎么开
  • 城镇土地使用税减免税政策
  • 子公司的注册资金需要母公司股东出吗?
  • 期末余额和期初余额
  • 预付款开了发票
  • 待抵扣税额转入进项税额的分录
  • 卸车费属于什么费用类别
  • 非税收入专用票据包括什么
  • 小规模纳税人发票可以抵扣吗
  • 开红字发票购买方和销货方有哪些操作不同?
  • 复利终值与现值的关系
  • 固定资产净额是什么意思
  • sql多条件组合条件的先后顺序
  • 怎么把mac系统的文件导出
  • winpe下载u盘启动版
  • win1共享
  • win7任务栏快捷启动如何设置
  • 安装xps虚拟打印机
  • 苹果Mac系统怎么装
  • win7怎样解除无线连接限制
  • 怎么恢复电脑win7系统
  • js深度拷贝的方法
  • android之Java+html+javascript混合开发
  • django 自定义权限管理
  • dos 到指定目录
  • 你知道什么是布
  • android应用市场有哪些
  • androidstudio如何放大代码
  • 1973年简并税制
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设