Discuz! Board

找回密码
立即注册
搜索
热搜: 活动 交友 discuz
发新帖

5

积分

好友

主题
发表于 2024-2-2 13:47:01 | 查看: 6| 回复: 0
首先下载百度编辑器,点击进行下载,将ueditor文件夹上传到include目录,打开include/inc/inc_fun_funAdmin.php文件,找到以下代码:
     $GLOBALS['tools'] = empty($toolbar[$etype])? $GLOBALS['tools'] : $toolbar[$etype] ;
     $config['toolbar'] = $GLOBALS['tools'];
     $config['height'] = $nheight;
     $config['skin'] = 'kama';
     $CKEditor-returnOutput = TRUE;
     $code = $CKEditor-editor($fname, $fvalue, $config, $events);
     if($gtype==print)
     {
     echo $code;
     }
     else
     {
     return $code;
     }
     }
    在以上代码的后面添加以下代码:
    else if($GLOBALS['cfg_html_editor']=='ueditor')
    {
     $fvalue = $fvalue=='' ? 'p/p' : $fvalue;
     $code = 'script type=text/javascript charset=gbk src='.$GLOBALS['cfg_cmspath'].'/include/ueditor/editor_config.js/script
     script type=text/javascript charset=gbk src='.$GLOBALS['cfg_cmspath'].'/include/ueditor/editor_all_min.js/script
     link rel=stylesheet type=text/css href='.$GLOBALS['cfg_cmspath'].'/include/ueditor/themes/default/
    script type=text/javascript
     uParse(.content,{
     
     })
     /script
     script id=editor name=body type=text/plain'.$fvalue.'/script
     script type=text/javascript
    var ue = UE.getEditor('editor');
    UE.getEditor('editor');
    /script';
     if($gtype==print)
     {
     echo $code;
     }
     else
     {
     return $code;
     }
    }
    然后修改编辑器配置:/include/ueditor/editor_config.js,找到以下代码:
    window.UEDITOR_HOME_URL = /xxxx/xxxx/;
    将以上代码替换成以下代码:
    window.UEDITOR_HOME_URL = /include/ueditor/;
    最后在后台设置 系统基本参数 核心设置 把编辑器fck修改成ueditor.

收藏回复 显示全部楼层 道具 举报

您需要登录后才可以回帖 登录 | 立即注册

Archiver|手机版|小黑屋|绿色能源汇

GMT+8, 2024-11-27 11:12 , Processed in 0.029729 second(s), 20 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表