- A+
所属分类:编程茶楼
1、ueditor的下载安装
到ueditor官网下载最新版的编辑器源码,下载地址:ueditor我下载的是[1.2.6.0 PHP 版本]
到dedecms的include目录新建文件夹ueditor,该文件夹就是ueditor路径,下面修改编辑器配置文件时需要该路径
2、修改dedecms编辑器配置文件
修改网站根目录下的include/inc/inc_fun_funAdmin.php文件。
找到:if($GLOBALS['cfg_html_editor']=='fck')
替换为:
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;
}
}
else if($GLOBALS['cfg_html_editor']=='fck')
3、修改dedecms默认编辑器为ueditor
进入dedecms后台管理,进入:系统 » 系统基本参数 » 核心设置 » Html编辑器(ckeditor,需要fck的用户可以去官网下载)
修改该项为ueditor,这里的ueditor与上面的else if($GLOBALS['cfg_html_editor']=='ueditor')一定要保持一致,包括大小写也要一样,否则将调用不了ueditor编辑器
- 我的微信
- 这是我的微信扫一扫
-
- 我的微信公众号
- 我的微信公众号扫一扫
-




