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

  • 拍卖行如何征税呢
  • 长期股权投资其他综合收益借贷方向
  • 零申报资产负债表年初与期末数
  • 工商银行特色贷款
  • 房地产企业增值税税率
  • 保险公司代扣代缴车船税完税证明
  • 自建的固定资产入账价值具体包括哪些
  • 境外中资企业转中资企业
  • 车间房屋维修费属于什么科目
  • 收社团费用怎么说
  • 农产品一般纳税人免税吗
  • 2017年7月后手撕发票还能报销吗?
  • 三代手续费入账
  • 出口退税预审在申报系统怎么做
  • 工资必须通过银行代发吗
  • 个税免税收入和不征税收入
  • 补提以前年度费用在年度报表中怎么填
  • 华为手机屏幕下的三个功能键设置方法
  • win10怎么关闭开机磁盘自检
  • 建筑业 分包
  • php如何使用session
  • 对于接受捐赠的固定资产,其成本应当依次按照
  • 其他应收款贷方表示什么
  • linux 分享文件
  • linux运维有前景吗
  • 存货跌价准备的计提
  • jetcar.exe - jetcar是什么进程 有什么作用
  • hiddenalbum是什么文件夹
  • linux递归创建目录命令
  • 公司房产税如何征收税率
  • 劳务派遣简易计税可以开专票吗
  • 提坏账准备的会计分录 2022
  • wordpress shortcode
  • php批量删除文件
  • vue怎么打断点
  • 轮播图效果用css怎么实现
  • ps像素大小怎么调整不了
  • js继承的几种方式 各有什么优缺点
  • 小企业发出存货成本的计量方法有
  • 劳动法节假日加班工资
  • 税务文书送达期限是多少天
  • 暂估入库成本处理
  • 建筑业成本需要摊销吗
  • 销售费用包括哪些明细科目
  • 呆账冲销是什么意思
  • 一般纳税人一直零申报会怎么样
  • 开票内容不在经营范围内
  • 预提费用没有收到发票也没有付款
  • 员工外面有自己的公司
  • 赠送客户的商品需要交税吗
  • etc的充值发票可以报账吗
  • 公司验资报告多少钱
  • 出口退税对应的进项不能抵扣对吗
  • 工程进度开票如何入账
  • 员工工资费用
  • 短期借款利息是多少
  • 帐薄和账簿区别
  • sqlserver完全删除
  • 可以按日期排序
  • linux的进程管理命令
  • window系统怎么复制粘贴
  • ghost后恢复数据
  • linux操作系统的安装
  • w10 xbox
  • mmc.exe是什么
  • win8怎么改文件格式
  • 萝卜家园和番茄花园哪个好
  • tab栏切换案例
  • python import同一目录的其他文件
  • cocos2dx官方教程
  • [置顶]电影名字《收件人不详》
  • css网站布局实录 pdf
  • python中pillow模块
  • javascript深入理解
  • pm2启动nodejs
  • nodejs开发web
  • jquery.filedownload.js
  • jquery页面
  • 当前税务干部队伍不足
  • 深圳大学各专业组代码
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设