精品国产免费观看久久久_久久天天躁狠狠躁夜夜爽_无码人妻少妇久久中文字幕_狠狠做深爱婷婷久久综合一区

互聯網知識

精準傳達 ? 價值共享

洞悉互聯網前沿資訊,探尋網站營銷規律

查看其它板塊

織夢ckeditor更換為ueditor百度編輯器(支持圖片水印和多個百度編輯器同時使用)

作者:狐靈科技 | 2019-12-19 14:38 |點擊:

最終效果


 

修正別人存在的問題

  • 支持圖片水印
  • 支持不過濾iframe
  • 支持一個頁面多個編輯器同時使用不沖突
  • 欄目內容、單頁無法保存問題

織夢ueditor打包下載

無論你是gbk程序還是utf8程序,都下載這個utf8版本的即可

https://pan.baidu.com/s/18V-Luk8mVAsldRbMrq0ByQ 密碼: aid5

本地下載:【推薦】

百度編輯器 ueditor

使用說明

 

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"> 內,就可以了。

catalog_add.htm 修改如下

catalog_edit.htm 修改如下




以上就可以了 如果存在以下問題自行修復下
 

本地上傳圖片添加水印的解決方法

打開 /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');

完成,這樣上傳本地圖片和批量上傳圖片就自動加水印了。

沒有插入外部mp4鏈接的小伙伴參考這個教程添加這個功能

1、打開 /include/ueditor/dialogs/video/video.html 找到,大概在36行

<div id="upload_left">

在它上面加入

<style>#videowebUrl{width:490px;height:21px;line-height:21px;margin:8px 5px;background:#fff;border:1px solid #d7d7d7}#upload .placeholder{height:115px;}</style>
<table><tr><td><label for="videowebUrl" class="url">視頻網址</label></td><td><input id="videowebUrl" type="text"></td></tr></table>

如圖

2、打開 /include/ueditor/dialogs/video/video.js 找到,大概在300行

var count = uploadFile.getQueueCount();

在它上面加入

if (weburl) {
	videoObjs.push({
		url:weburl,
		width:width,
		height:height,
		align:align
	});
}

 

如圖

完成,刷新后臺,查看效果

 


如沒特殊注明,文章均為狐靈科技原創,轉載請注明?? "織夢ckeditor更換為ueditor百度編輯器(支持圖片水印和多個百度編輯器同時使用)
多一份免費策劃方案,總有益處。

請直接添加技術總監微信聯系咨詢

網站設計 品牌營銷

多一份參考,總有益處

聯系狐靈科技,免費獲得專屬《策劃方案》及報價

咨詢相關問題或預約面談,可以通過以下方式與我們聯系

業務熱線:15082661954 / 大客戶專線:15523356218