織夢DEDECMS安裝百度編輯器ueditor的方法

1.根據(jù)你的網(wǎng)站編碼,下載相應(yīng)編碼的編輯器包。在include文件夾里,新建一個(gè)名為ueditor文件夾,把剛才下載的文件放到里面。

1

2.打開include下的inc文件夾內(nèi)的inc_func_funcAdmin.php找到184行,在下面放入下面的代碼,然后保存。這段代碼是只有一個(gè)編輯器的情況下使用。

//百度編輯器
else if($GLOBALS['cfg_html_editor']=='ueditor')
{
 $fvalue = $fvalue=='' ? '<p></p>' : $fvalue;
$code = '<script type="text/javascript" charset="utf-8"
src="/include/ueditor/ueditor.config.js"></script>
 <script type="text/javascript" charset="utf-8"
src="/include/ueditor/ueditor.all.js"></script>
<link rel="stylesheet" type="text/css"
href="/include/ueditor/themes/default/css/ueditor.css"/>
<textarea name="'.$fname.'" id="'.$fname.'"
style="width:100%;height:400px;">'.$fvalue.'</textarea>
<script type="text/javascript">var ue = new
baidu.editor.ui.Editor();ue.render("'.$fname.'");</script>';
if($gtype=="print")
{
  echo $code;
 }
 else
{
 return $code;
}
}

2

下面的代碼是多個(gè)編輯器時(shí)使用的

//百度編輯器
else if($GLOBALS['cfg_html_editor']=='ueditor')
{
	$fvalue = $fvalue=='' ? '<p></p>' : $fvalue;
	$code = '<script type="text/javascript" charset="utf-8" src="http://apps.bdimg.com/libs/jquery/1.6.4/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 ,然后保存。



3 4

 

織夢DEDECMS百度編輯器Ueditor上傳圖片及下載遠(yuǎn)程圖片無法加水印的解決方法

 

THE END
亚洲中文色欧另类欧美,久久久久久久激情,亚洲 日韩 欧美 另类 国产,中文字幕高清无码男人的天堂 www.sucaiwu.net