Ecshop background Editor Replace with Ueditor editor _php instance

Source: Internet
Author: User

1, Ueditor1.4.3 download (the latest version as of 2015-03-03)

Download Address: http://ueditor.baidu.com/website/download.html
jquery conflicts resolution jquery and other related file downloads
The file contains JS conflict modification file, the other has modified the Php/config.json in the map Save the path, users can also modify their own!
Because Lao Yang is using Mac OS system, there are some in the file. Ds_store file, can be ignored or deleted by itself
Download Address: Http://pan.baidu.com/s/1gdglb0J Password: fflu (provided by Lao Yang)

2, upload to the Web server

Unzip and upload the directory uediter to the root directory/includes
Unpack Lao Yang's dongdong, upload the fix_jquery to the Ueditor directory

3. Modify/admin/includes/lib_main.php

Find the following function

Copy Code code as follows:

/**
* Build Editor
* @param string Input_name The name of the input box
* @param string input_value input Box 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);
}

To be replaced by:

Copy Code code as follows:

/**
* Build Editor
* @param string Input_name The name of the input box
* @param string input_value input Box value
*/
function Create_html_editor ($input _name, $input _value = ")
{
Global $smarty;
$kindeditor = "
<script id= ' editor ' name= ' $input _name ' type= ' text/plain ' style= '; > $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. Modify/admin/templates/pageheader.htm

Find:

Copy Code code as follows:

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

To be replaced by:

Copy Code code as follows:

<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, solve the product editor is reset, Uedite can not save the content of the bug.

File:/admin/templates/goods_info.htm
Found it:

Copy Code code as follows:

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

Comment out:

Copy Code code as follows:

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

The above mentioned is the entire content of this article, I hope you can enjoy.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.