溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

ecshop后臺編輯器替換成ueditor編輯器有什么用

發(fā)布時間:2021-07-02 16:49:51 來源:億速云 閱讀:141 作者:chen 欄目:開發(fā)技術(shù)

這篇文章主要講解了“ecshop后臺編輯器替換成ueditor編輯器有什么用”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“ecshop后臺編輯器替換成ueditor編輯器有什么用”吧!

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ù)

復(fù)制代碼 代碼如下:


/**
 * 生成編輯器
 * @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); 
}

替換為:

復(fù)制代碼 代碼如下:


/**
 * 生成編輯器
 * @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

查找:

復(fù)制代碼 代碼如下:


{insert_scripts files="../js/transport.js,common.js,../js/utils.js"}

替換為:

復(fù)制代碼 代碼如下:


<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
找到:

復(fù)制代碼 代碼如下:


document.forms['theForm'].reset();

注釋掉:

復(fù)制代碼 代碼如下:


//document.forms['theForm'].reset();

感謝各位的閱讀,以上就是“ecshop后臺編輯器替換成ueditor編輯器有什么用”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對ecshop后臺編輯器替換成ueditor編輯器有什么用這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關(guān)知識點的文章,歡迎關(guān)注!

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI