ecshop后台编辑器替换成ueditor编辑器


Posted in PHP onMarch 03, 2015

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="

    <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无法保存内容的bug。

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

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

注释掉:

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

以上所述就是本文的全部内容了,希望大家能够喜欢。

PHP 相关文章推荐
PHP+DBM的同学录程序(4)
Oct 09 PHP
php 购物车实例(申精)
May 11 PHP
2个Codeigniter文件批量上传控制器写法例子
Jul 25 PHP
php 删除cookie方法详解
Dec 01 PHP
php自定义错误处理用法实例
Mar 20 PHP
详解php比较操作符的安全问题
Dec 03 PHP
Symfony2开发之控制器用法实例分析
Feb 05 PHP
YII Framework框架教程之使用YIIC快速创建YII应用详解
Mar 15 PHP
php实现批量删除挂马文件及批量替换页面内容完整实例
Jul 08 PHP
php实现微信扫码自动登陆与注册功能
Sep 22 PHP
php 二维数组快速排序算法的实现代码
Oct 17 PHP
php xhprof使用实例详解
Apr 15 PHP
php使用curl出现Expect:100-continue解决方法
Mar 03 #PHP
php实现四舍五入的方法小结
Mar 03 #PHP
Mac系统下使用brew搭建PHP(LNMP/LAMP)开发环境
Mar 03 #PHP
laravel容器延迟加载以及auth扩展详解
Mar 02 #PHP
laravel安装zend opcache加速器教程
Mar 02 #PHP
分享一个Laravel好用的Cache宏
Mar 02 #PHP
php解析http获取的json字符串变量总是空白null
Mar 02 #PHP
You might like
PHP 读取文件的正确方法
2009/04/29 PHP
php无限极分类递归排序实现方法
2014/11/11 PHP
JQuery的html(data)方法与&amp;lt;script&amp;gt;脚本块的解决方法
2010/03/09 Javascript
javascript中的onkeyup和onkeydown区别介绍
2013/04/28 Javascript
如何根据百度地图计算出两地之间的驾驶距离(两种语言js和C#)
2015/10/29 Javascript
js判断所有表单项不为空则提交表单的实现方法
2016/09/09 Javascript
微信小程序 wx.uploadFile无法上传解决办法
2016/12/14 Javascript
JQuery实现动态操作表格
2017/01/11 Javascript
JavaScript实现计数器基础方法
2017/10/10 Javascript
JavaScript分步实现一个出生日期的正则表达式
2018/03/22 Javascript
vue中axios实现数据交互与跨域问题
2019/05/12 Javascript
jquery实现淡入淡出轮播图效果
2020/12/13 jQuery
[06:11]2014DOTA2国际邀请赛 专访团结一心的VG战队
2014/07/21 DOTA
Python实现的科学计算器功能示例
2017/08/04 Python
django中模板的html自动转意方法
2018/05/27 Python
在python2.7中用numpy.reshape 对图像进行切割的方法
2018/12/05 Python
通过python改变图片特定区域的颜色详解
2019/07/15 Python
pandas如何处理缺失值
2019/07/31 Python
详解Anconda环境下载python包的教程(图形界面+命令行+pycharm安装)
2019/11/11 Python
Python实现搜索算法的实例代码
2020/01/02 Python
Django后台管理系统的图文使用教学
2020/01/20 Python
米兰必去买手店排行榜首位:Antonioli
2016/09/11 全球购物
临床医学专业毕业生的自我评价
2013/10/17 职场文书
企划主管岗位职责
2013/12/12 职场文书
化验室技术员岗位职责
2013/12/24 职场文书
工会主席岗位责任制
2014/02/11 职场文书
犯错检讨书
2014/02/21 职场文书
2014年无财产无子女离婚协议书范本
2014/10/09 职场文书
简历自我评价模板
2015/03/11 职场文书
火烧圆明园观后感
2015/06/03 职场文书
致运动员的广播稿
2015/08/19 职场文书
2016党员入党决心书
2015/09/22 职场文书
2015年物业管理员工工作总结
2015/10/15 职场文书
继续教育心得体会(共6篇)
2016/01/19 职场文书
七年级作文之环保作文
2019/10/17 职场文书
Python insert() / append() 用法 Leetcode实战演示
2021/03/31 Python