dedecms更换百度编辑器

下载百度ueditor编辑器源码

搜索“百度ueditor”去官方下载编辑器源码

 

安装百度ueditor编辑器

在include目录下新建一个“ueditor”文件夹,讲刚才下载的文件解压后上传至此目录。

 

修改配置文件

找到include/inc/下的inc_func_funcAdmin.php文件,在判断编辑器部分,如下

 

if($GLOBALS['cfg_html_editor']=='fck')

在它后面大概367行添加如下判断

 

else if($GLOBALS['cfg_html_editor']=='ueditor') { $fvalue = $fvalue=='' ? '<p></p>' : $fvalue; $code = '<script type="text/javascript" charset="utf-8" src="/include/ueditor/ueditor.config.js"></script> <script type="text/javascript" charset="utf-8" src="/include/ueditor/ueditor.all.js"></script> <link rel="stylesheet" type="text/css" href="/include/ueditor/themes/default/css/ueditor.css"/> <textarea name="'.$fname.'" id="'.$fname.'" style="width:100%;">'.$fvalue.'</textarea> <script type="text/javascript">var ue = new baidu.editor.ui.Editor();ue.render("'.$fname.'");</script>'; if($gtype=="print") { echo $code; } else { return $code; } }

修改网站后台系统配置

进入后台,在>系统>系统基本参数>核心设置>将“Html编辑器”改为“ueditor”,然后保存即可。


1、本网站名称:源码村资源网
2、本站永久网址:https://www.yuanmacun.com
3、本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行删除处理。
4、本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
5、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6、本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。
源码村资源网 » dedecms更换百度编辑器
您需要 登录账户 后才能发表评论