2 Comments

织梦安装百度编辑器

发布于:2017-06-29  |   作者:admin  |   已聚集:人围观

1、直接到百度编辑器官方下载PHP对应的版本

ueditor官方地址:http://ueditor.baidu.com/website/download.html

2、dedecms 程序 include文件夹下,创建 ueditor 文件夹

把下载到的ueditor文件扔进去(index.html不要)

  

 

3、include\inc\inc_fun_funAdmin.php 增加ueditor编辑器

找到

  

else if($GLOBALS['cfg_html_editor']=='ckeditor')
{

 ...中间代码省略

}

在它们的下面增加

//百度编辑器
else if($GLOBALS['cfg_html_editor']=='ueditor')
{
    $fvalue = $fvalue=='' ? '<p></p>' : $fvalue;
    $code = '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/ueditor.config.js"></script>';
    $code .= '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/ueditor.all.min.js"></script>';
    $code .= '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/lang/zh-cn/zh-cn.js"></script>';
    $code .= '<link rel="stylesheet" type="text/css" href="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/themes/default/css/ueditor.css"/>';
    $code .= '<script type="text/plain" name="'.$fname.'" id="'.$fname.'">'.$fvalue.'</script>';
    if($bbcode)
    {
        $code .= '<script type="text/javascript">UE.getEditor("'.$fname.'",{toolbars:[["Source","|",
    "bold", "italic", "underline","|","fontsize","forecolor","emotion","Undo", "Redo"]],initialFrameHeight:100});</script>';
    }
    else
    {
        $code .= '<script type="text/javascript">UE.getEditor("'.$fname.'",{initialFrameHeight:450});</script>';
    }         
  
    if($gtype=="print")
    {
        echo $code;
    }
    else
    {
        return $code;
    }
}

4、后台配置修改编辑为ueditor

标签:(18)(1)
专业承接织梦仿站,织梦模块开发,织梦插件开发,织梦模板定制,网站优化,可联系QQ:
点击这里给我发消息
 报上名号来:     神兽验证马:
点击我更换验证码
飞机