国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > Ecshop > 正文

ecshop后臺編輯器替換成ueditor編輯器

2024-09-06 22:47:03
字體:
供稿:網(wǎng)友

 這篇文章主要介紹了ecshop后臺編輯器替換成ueditor編輯器的詳細(xì)過程,這里推薦給有相同需求的小伙伴們。

  

1、Ueditor1.4.3下載(截止到2015-03-03最新版)

下載地址:http://ueditor.baidu.com/website/download.html
解決jquery沖突的jquery等相關(guān)文件下載
文件中已含js沖突修改文件,另外已修改php/config.json中的圖處保存路徑,用戶也可以自行修改!
因為老楊用的是mac os系統(tǒng),所以文件中有一些.DS_store文件,可以忽略或自行刪除
下載地址:http://pan.baidu.com/s/1gdglb0J 密碼:fflu (老楊提供)

2、上傳到網(wǎng)站服務(wù)器

解壓并上傳目錄 uediter 到根目錄 /includes 下
解壓老楊的那個東東,把fix_jquery上傳到 ueditor 的目錄下

3、修改/admin/includes/lib_main.php

找到下面的函數(shù)

 

代碼如下:
/**
* 生成編輯器
* @param string input_name 輸入框名稱
* @param string input_value 輸入框值
*/
function create_html_editor($input_name, $input_value = '')
{
global $smarty;

$editor = new FCKeditor($input_name);
$editor->BasePath = '../includes/fckeditor/';
$editor->ToolbarSet = 'Normal';
$editor->Width = '100%';
$editor->Height = '320';
$editor->Value = $input_value;
$FCKeditor = $editor->CreateHtml();
$smarty->assign('FCKeditor', $FCKeditor);
}

 

替換為:

 

代碼如下:
/**
* 生成編輯器
* @param string input_name 輸入框名稱
* @param string input_value 輸入框值
*/
function create_html_editor($input_name, $input_value = '')
{
global $smarty;
$kindeditor="
<script id='editor' name='$input_name' type='text/plain' style='width:1024px;height:500px;'>$input_value</script>
<script charset='utf-8' src='../includes/ueditor/ueditor.config.js'></script>
<script charset='utf-8' src='../includes/ueditor/ueditor.all.min.js'></script>
<script>
var ue = UE.getEditor('editor');
</script>
";
$smarty->assign('FCKeditor', $kindeditor);
}

 

4、修改/admin/templates/pageheader.htm

查找:

 

代碼如下:
{insert_scripts files="../js/transport.js,common.js,../js/utils.js"}

 

替換為:

 

代碼如下:
<script src="../includes/ueditor/fix_jquery/jquery.min.js"></script>
<script src="../includes/ueditor/fix_jquery/jquery.json-1.3.js"></script>
<script src="js/common.js"></script>
<script src="../includes/ueditor/fix_jquery/transport_json.js"></script>
{insert_scripts files="../js/utils.js"}

 

5、解決商品編輯中編輯器被重置,uedite無法保存內(nèi)容的bug。

文件:/admin/templates/goods_info.htm
找到:

 

代碼如下:
document.forms['theForm'].reset();

 

注釋掉:

 

代碼如下:
//document.forms['theForm'].reset();

 

以上所述就是本文的全部內(nèi)容了,希望大家能夠喜歡。

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 无为县| 东乡县| 波密县| 修武县| 会同县| 闸北区| 稷山县| 防城港市| 玉环县| 文水县| 拉萨市| 镇赉县| 江口县| 河西区| 兴隆县| 涟水县| 盐津县| 禄劝| 太白县| 西充县| 宜春市| 安龙县| 邛崃市| 阿拉善盟| 孙吴县| 夏津县| 巴马| 鄂尔多斯市| 红河县| 山东省| 桓仁| 舟山市| 阿勒泰市| 玉溪市| 新营市| 行唐县| 池州市| 唐河县| 三门县| 张家港市| 临清市|