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

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

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

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

织梦更换ueditor百度编辑器(支持图片水印和多个百度编辑器同时使用)

3、includeincinc_fun_funAdmin.php增加ueditor编辑器

找到

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

{

...中间代码省略

}

在它们的下面增加

//百度编辑器
elseif($GLOBALS['cfg_html_editor']=='ueditor')
{
	$fvalue=$fvalue==''?'<p></p>':$fvalue;
	$code='<scripttype="text/javascript"charset="utf-8"src="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js"></script><!--需要jquery解决多个百度编辑器同时使用-->';
	$code.='<scripttype="text/javascript"charset="utf-8"src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/ueditor.config.js"></script>';
	$code.='<scripttype="text/javascript"charset="utf-8"src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/ueditor.all.min.js"></script>';
	$code.='<scripttype="text/javascript"charset="utf-8"src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/lang/zh-cn/zh-cn.js"></script>';
	$code.='<linkrel="stylesheet"type="text/css"href="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/themes/default/css/ueditor.css"/>';
	$code.='<scripttype="text/plain"name="'.$fname.'"id="'.$fname.'">'.$fvalue.'</script>';
	if($bbcode)
	{
		$code.='<scripttype="text/javascript">jQuery.noConflict();jQuery(function(){varue=UE.getEditor("'.$fname.'",{toolbars:[["Source","|",
	"bold","italic","underline","|","fontsize","forecolor","emotion","Undo","Redo"]],initialFrameHeight:100});});</script>';
	}
	else
	{
		$code.='<scripttype="text/javascript">jQuery.noConflict();jQuery(function(){varue=UE.getEditor("'.$fname.'",{initialFrameHeight:450});});</script>';
	}

	if($gtype=="print")
	{
		echo$code;
	}
	else
	{
		return$code;
	}
}

4、修改ueditor上传文件的路径

打开includeueditorphpconfig.json

里面的

/ueditor/php/upload/image/

/ueditor/php/upload/video/

/ueditor/php/upload/file/

修改成自己的,如:

/uploads/allimg/

/uploads/video/

/uploads/file/

5、后台-系统-核心设置-Html编辑器,里面填上ueditor

织梦更换ueditor百度编辑器(支持图片水印和多个百度编辑器同时使用)

完成

dedecms织梦更换ueditor后栏目内容、单页无法保存问题的解决方法

打开

dede empletscatalog_add.htm (dede是你的后台目录)

dede empletscatalog_edit.htm

把里面的form放置到

<td height="95" bgcolor="#FFFFFF">

内,就可以了。

织梦更换ueditor百度编辑器(支持图片水印和多个百度编辑器同时使用)

若GBK网站替换后,中文出现乱码,可以参考这篇《织梦整合百度编辑器ueditor编码gbk中文乱码解决方法》

本地上传图片添加水印的解决方法

打开includeueditorphpction_upload.php找到

include "Uploader.class.php";

在它下面加入

require_once("../../common.inc.php");

require_once("../../image.func.php");

再打开includeueditorphpUploader.class.php找到

$this->stateInfo = $this->stateMap[0];

大概在124行左右

在它下面加入

@WaterImg($this->filePath, 'down');

完成,这样上传本地图片和批量上传图片就自动加水印了。

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。