欢迎来到258分享网,纯净的网络源码分享基地!

258资源分享网

全部作品
全部作品
网站源码
微信源码
素材特效
源码插件
视频教程
建站学院
热门搜索: 织梦  农业种植  农业  安全设置  官方
258资源分享 > 建站学院 > 织梦教程 > 织梦更换ueditor百度编辑器(支持图片水印和多个百度编辑器同时使用)

推荐下载

HTML5响应式自适应网咯设计

2020-05-12   浏览:740

高端HTML5响应式企业通用网

2020-05-06   浏览:521

html5响应式外贸网站英文版

2020-05-08   浏览:510

HTML5自适应律师工作室类网

2020-04-04   浏览:504

HTML5影视传媒文化公司类网

2020-05-12   浏览:500

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

发布时间:2020-07-20  

ueditor官方地址:

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

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

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

3、includeincinc_fun_funAdmin.php 增加ueditor编辑器

找到

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=""></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; } }

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');

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