织梦ckeditor更换为ueditor百度编辑器

相关案例演示

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

织梦ueditor打包下载

链接: https://pan.baidu.com/s/1iTPuFXSkgXdKhbPaHParyg 提取码: 5ubw 复制这段内容后打开百度网盘

1、把下载的zip解压得到ueditor文件夹,把解压到的ueditor文件夹扔进你网站的include文件夹去

2、打开 /include/inc/inc_fun_funAdmin.php 找到

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

在它上面加入

else if($GLOBALS['cfg_html_editor']=='ueditor')
{
	$fvalue = $fvalue=='' ? '<p></p>' : $fvalue;
	$code = '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/jquery.min.js"></script><!--需要jquery解决多个百度编辑器同时使用-->';
	$code .= '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/ueditor.config.js"></script>';
	$code .= '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/ueditor.all.min.js"></script>';
	$code .= '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/lang/zh-cn/zh-cn.js"></script>';
	$code .= '<link rel="stylesheet" type="text/css" href="'.$GLOBALS['cfg_cmspath'].'/include/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;
	}
}

3、后台-系统-系统基本参数-核心设置-Html编辑器 ,选择 ueditor

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

打开
 

/dede/templets/catalog_add.htm
/dede/templets/catalog_edit.htm

把里面的 form 放置到 <td height="95" align="center" bgcolor="#FFFFFF"> 内,就可以了。

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

打开 /include/ueditor/php/action_upload.php 找到

include "Uploader.class.php";

在它下面加入

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

打开 /include/ueditor/php/Uploader.class.php 找到 大概在124行左右

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

在它下面加入

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

全部完成。

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


来源:网友投稿 关注: 时间:2019-11-13 10:26
首先声明,只要是我们的vip会员所有源码均可以免费下载,不做任何限制(了解更多)
☉本站的源码不会像其它下载站一样植入大量的广告。为了更好的用户体验以后坚持不打水印
☉本站只提供精品织梦源码,源码在于可用,不在多!!希望在这里找到你合适的。
☉本站提供的整站织梦程序,均带数据及演示地址。可以在任一源码详情页查看演示地址
☉本站所有资源(包括源码、模板、素材、特效等)仅供学习与参考,请勿用于商业用途。
☉如有其他问题,请加网站客服QQ进行交流。
相关织梦教程
QQ在线咨询