dedecms更换html编辑器为ueditor

2014-12-11 08:00:00 # 清学小记

网上试了好多代码,终于找到这一段成功了,留存一下:

| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | `else if($GLOBALS[‘cfg_html_editor’]==’ueditor’)
{
$fvalue = $fvalue==’’ ? ‘’ : $fvalue;
$code = ‘’;
$code .= ‘’;
$code .= ‘’cfg_cmspath’].’/include/ueditor/themes/default/css/ueditor.css”/>’;
//$code .= ‘’.$fvalue.’’; $code .= ‘’;
if($bbcode)
{
$code .= ‘’;
}
else {
$code .= ‘’;
}

    if($gtype=="print")  
    {  
        echo $code;  
    }  
    else        {  
        return $code;  
    }  
}//bd end` |

| —————————————————————————————————————————– | —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— |

替换步骤也简单记录一下:

1、下载ueditor并改好名字放在dedecms的“include”目录;

2、修改include目录中“inc”目录里的“inc_fun_funAdmin.php”文件,找到“获取编辑器”段的函数“SpGetEditor”代码,在其“else”前添加如上代码;

3、进入dedecms后台→系统→系统基本参数→核心设置,修改html编辑器的名字为ueditor。