ecshop後台編輯器替換成ueditor編輯器_php執行個體

來源:互聯網
上載者:User
1、Ueditor1.4.3下載(截止到2015-03-03最新版)

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

2、上傳到網站伺服器

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

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

找到下面的函數

複製代碼 代碼如下:
/**
* 產生編輯器
* @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="




";
$smarty->assign('FCKeditor', $kindeditor);
}

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

尋找:

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

替換為:

複製代碼 代碼如下:




{insert_scripts files="../js/utils.js"}

5、解決商品編輯中編輯器被重設,uedite無法儲存內容的bug。

檔案:/admin/templates/goods_info.htm
找到:

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

注釋掉:

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

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

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.