|
发表于 2024-2-2 13:47:01
|
查看: 4 |
回复: 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. |
|