ecshop后臺(tái)編輯器替換成ueditor編輯器
來源:易賢網(wǎng) 閱讀:2010 次 日期:2015-03-05 10:50:48
溫馨提示:易賢網(wǎng)小編為您整理了“ecshop后臺(tái)編輯器替換成ueditor編輯器”,方便廣大網(wǎng)友查閱!

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

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

下載地址

解決jquery沖突的jquery等相關(guān)文件下載

文件中已含js沖突修改文件,另外已修改php/config.json中的圖處保存路徑,用戶也可以自行修改!

因?yàn)槔蠗钣玫氖莔ac os系統(tǒng),所以文件中有一些.DS_store文件,可以忽略或自行刪除

下載地址:密碼:fflu (老楊提供)

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

解壓并上傳目錄 uediter 到根目錄 /includes 下

解壓老楊的那個(gè)東東,把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();

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

更多信息請(qǐng)查看IT技術(shù)專欄

更多信息請(qǐng)查看網(wǎng)絡(luò)編程

扫描二维码关注易贤网公众号

易賢網(wǎng)手機(jī)網(wǎng)站地址:ecshop后臺(tái)編輯器替換成ueditor編輯器
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇?zhǔn)!

2025國考·省考課程試聽報(bào)名

  • 報(bào)班類型
  • 姓名
  • 手機(jī)號(hào)
  • 驗(yàn)證碼

【备考推荐】2025年事业单位联考系统精讲课,免费试看,配套资料包邮到家

關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢 | 簡(jiǎn)要咨詢須知 | 新媒體/短視頻平臺(tái) | 手機(jī)站點(diǎn) | 投訴建議
工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
云南網(wǎng)警備案專用圖標(biāo)
聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號(hào):hfpxwx
咨詢QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)
云南網(wǎng)警報(bào)警專用圖標(biāo)