DeDeBIZ织梦安装UEditor百度编辑器

snh102 By snh102 at 2025-02-16 • 暂不可见      举报

对于站长来说,网站编辑器很重要。
下面,介绍DeDeBIZ安装百度UEditor编辑器使用教程与使用方法。

百度编辑器精简版下载

本地下载

下载完成后,解压到网站根目录。

安装教程

打开 /system/inc/inc_fun_funAdmin.php 搜索

function SpGetEditor(

然后把这整个函数都改了

function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype = "print", $isfullpage = "false", $bbcode = false)
{
    中间代码省略......
}

把它改为

function SpGetEditor($fname,$fvalue,$nheight="350",$etype="Basic",$gtype="print",$isfullpage="false",$bbcode=false)
{
    global $cfg_ckeditor_initialized;
    if(!isset($GLOBALS['cfg_html_editor']))
    {
        $GLOBALS['cfg_html_editor']='ueditor';
    }
    if($gtype=="")
    {
        $gtype = "print";
    }
    if($GLOBALS['cfg_html_editor']=='ueditor' || $GLOBALS['cfg_html_editor']=='ckeditor')
{
	$fvalue = $fvalue=='' ? '' : $fvalue;
	$code = '<script type="text/javascript" charset="utf-8" src="/ueditor/jquery.min.js"></script>';
	$code .= '<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>';
	$code .= '<script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.min.js"></script>';
	$code .= '<script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>';
	$code .= '<link rel="stylesheet" type="text/css" href="/ueditor/themes/default/css/ueditor.css"/>';
	$code .= '<script type="text/plain" name="'.$fname.'" id="'.$fname.'">'.$fvalue.'</script>';
	if($bbcode)
	{
		$code .= '<script type="text/javascript">jQuery.noConflict();jQuery(function(){var ue = UE.getEditor("'.$fname.'",{toolbars:[["Source","|",
	"bold", "italic", "underline","|","fontsize","forecolor","emotion","Undo", "Redo"]],initialFrameHeight:100});});</script>';
	}
	else
	{
		$code .= '<script type="text/javascript">jQuery.noConflict();jQuery(function(){var ue = UE.getEditor("'.$fname.'",{initialFrameHeight:450});});</script>';
	}          
 
	if($gtype=="print")
	{
		echo $code;
	}
	else
	{
		return $code;
	}
}
    else { 
        /*
        // ------------------------------------------------------------------------
        // 设置添加多个编辑器
        */
    }
}

一个百度编辑器就够了。修改附件目录就往下看。

那个 /static/ckeditor 原编辑器目录,不用的话可删。

修改附件目录

文件图片、附件保存目录修改,新网站的话不需要,旧网站的话就需要改和原站一样。

打开 /ueditor/php/config.json 文件,这个就是附件保存目录了。

如有问题,可参考《织梦编辑器换为百度编辑器的教程》DeDeCMS的教程,如果不会解决的可在下方留言。

温馨提示

内容由用户共同创建和维护,并不代表织梦爱好者论坛立场!
建议您独自对内容进行评估,核实并咨询相关的专业人士!

DeDeBIZ织梦安装UEditor百度编辑器DeDeBIZ织梦安装UEditor百度编辑器DeDeBIZ织梦安装UEditor百度编辑器DeDeBIZ织梦安装UEditor百度编辑器DeDeBIZ织梦安装UEditor百度编辑器+36  36 个回复 | 最后更新于 2025-02-16
该部分是隐藏区

登录后查看回复

该部分是隐藏区

登录后方可回帖

Loading...