織夢ckeditor更換為ueditor百度編輯器(支持圖片水印和多個(gè)百度編輯器同時(shí)使用)
織夢ueditor打包下載
鏈接: https://pan.baidu.com/s/1iTPuFXSkgXdKhbPaHParyg 提取碼: 5ubw 復(fù)制這段內(nèi)容后打開百度網(wǎng)盤
1、把下載的zip解壓得到ueditor文件夾,把解壓到的ueditor文件夾扔進(jìn)你網(wǎng)站的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解決多個(gè)百度編輯器同時(shí)使用-->';
$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、后臺-系統(tǒng)-系統(tǒng)基本參數(shù)-核心設(shè)置-Html編輯器 ,選擇 ueditor
更換ueditor后欄目內(nèi)容、單頁無法保存問題的解決方法
打開
把里面的 form 放置到 <td height="95" align="center" bgcolor="#FFFFFF"> 內(nèi),就可以了。
打開 /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');
全部完成。
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請注明: 織夢ckeditor更換為ueditor百度編輯器