位置: 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数据库分表储存数据负载性能优化(织梦模板安装完整教程)

  • 培训费计入办公会计科目吗?
  • 工会经费网上缴费
  • 金税盘如何增加税率
  • 什么企业可以开增值税专用发票
  • 增值税的附加税率是多少
  • 对于子女继承父母的评价
  • 城市规划部门收取的市政建设配套费是否作为契税的征税基数
  • 政府补贴流程
  • 企业处置固定资产
  • 长期借款科目核算的是企业的长期借款本金和利息
  • 买空调交税是谁交税
  • 即征即退和一般项目进项税比例怎样算出进项税额
  • 跨年冲销营业外支出
  • 其他收益是否缴纳个税
  • 水费分割单由哪一方出具
  • 离职补偿金需要交工会经费吗
  • 服务费与劳务费税率的区别
  • 固定资产少计提了怎么办
  • 简易计税分包抵减
  • 华为mate50 pro
  • php中session什么意思
  • 如何解决Windows10电脑卡顿现象
  • 商业成本结转会计分录
  • PHP:preg_replace()的用法_PCRE正则函数
  • 工程施工暂估成本的账务处理流程
  • 君子兰的养殖方法
  • 森林抗锯齿
  • 计算企业所得税分录
  • 博登湖下载
  • gpt详解
  • php方法重载
  • 小微企业免教育附加
  • 红字发票账务处理需冲回成本吗?
  • 莫尔道嘎湿地公园
  • deepwiser怎么用
  • 企业缴纳职工社保比例的规定
  • php二维数组去重函数
  • 代扣代缴增值税账务处理
  • 凭证怎么记账
  • css+html
  • push指令执行的详细过程
  • uniapp支付宝支付开发
  • 建筑工程收到材料发票怎么做账
  • 长期待摊费用装修费摊销年限
  • 民间非营利组织会计账务处理
  • 合作卖东西怎么分成
  • 织梦森林官网
  • mongodb 增加用户
  • 银行存款余额调节表保管期限
  • 固定资产降低
  • 独立核算的分公司可以享受六税两费减半吗
  • 设计公司成本核算分录
  • sqlserver存储过程返回多个结果集
  • 业务招待费汇算清缴账务处理
  • 负债项目的排列顺序
  • 房屋租赁合同印花税计税依据
  • 现金日记账定金怎么算
  • 企业退休职工取暖费
  • 公司借调人员工资账务处理
  • 短期理财收益账务分录
  • 发票抬头是个人税号怎么填
  • sql server Bulk Insert命令详细
  • Linux下MySQL5.7.18二进制包安装教程(无默认配置文件my_default.cnf)
  • WINDOWS系统中删除放入回收站的文件占用什么空间
  • win10截图截不了怎么办?
  • win10更新后自动锁定
  • 升级win10系统后电脑变卡处理方法
  • win8.1应用商店下载位置
  • win8安装ie11
  • Ubuntu14.04 GLUT的安装
  • js怎么用jquery
  • 原生js实现ajax步骤
  • jQuery xml字符串的解析、读取及查找方法
  • jquery图片轮播代码
  • 上海电子发票试点
  • 国家税务总局千户集团
  • 新疆办房产证需要多久能拿证
  • 消费税是含税价
  • 重庆电子税务局怎么开电子发票
  • 税务征管科与纳税人有接触吗
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设