DedeCMS整合百度ueditor编辑器

DedeCMS版本:UTF-8 V5.7.101正式版(更新日期:2022-09-30)   官方下载

Ueditor版本:UTF-8  v1.4.3.3   官方下载

一、整合编辑器

1、将Ueditor下载后解压,并且修改文件夹名为:ueditor

2、将 ueditor 文件夹复制到 DedeCMS 路径下的 include 文件夹下

3、修改 \include\inc\inc_fun_funAdmin.php 文件
 

在当前文件的187行代码  else if($GLOBALS['cfg_html_editor']=='ckeditor') 的上方增加以下代码

    // 百度ueditor编辑器----开始
    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%;height: 600px;">'.$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;
                }
    }
    // 百度ueditor编辑器----结束

如图所示:

 4、修改完毕后,进入DedeCMS后台:系统 —> 系统基本参数 —> 核心设置 —> html编辑器支持
填写:ueditor  点击确定后进入:生成 —> 更新系统缓存

二、修改图片保存路径

1、修改 \include\ueditor\php\config.json 文件,将该文件中所有 /ueditor/php/upload (一共8处)修改为自定义的路径即可

三、Ueditor七牛云存储版本

如果需要站点图片保存到七牛云存储可以使用此版本
下载地址:https://codeload.github.com/widuu/qiniu_ueditor_1.4.3/zip/refs/tags/0.01


 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值