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 相关文章推荐
第二节 对象模型 [2]
Oct 09 PHP
几个学习PHP的网址
Nov 25 PHP
mysql4.1以上版本连接时出现Client does not support authentication protocol问题解决办法
Mar 15 PHP
PHP最常用的ini函数分析 针对PHP.ini配置文件
Apr 22 PHP
ThinkPHP之getField详解
Jun 20 PHP
Discuz批量替换帖子内容的方法(使用SQL更新数据库)
Jun 23 PHP
discuz目录文件资料汇总
Dec 30 PHP
php读取csc文件并输出
May 21 PHP
PHP封装的Twitter访问类实例
Jul 18 PHP
PHP结合jQuery实现找回密码
Jul 22 PHP
php实现图片按比例截取的方法
Feb 06 PHP
php 多进程编程父进程的阻塞与非阻塞实例分析
Feb 22 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 中文字符入库或显示乱码问题的解决方法
2010/04/12 PHP
PHP给文字内容中的关键字进行套红处理
2016/04/12 PHP
PHP Post获取不到非表单数据的问题解决办法
2018/02/27 PHP
JavaScript中的私有成员
2006/09/18 Javascript
jquery的ajax从纯真网(cz88.net)获取IP地址对应地区名
2009/12/02 Javascript
javascript开发随笔一 preventDefault的必要
2011/11/25 Javascript
JS+CSS制作DIV层可(最小化/拖拽/排序)功能实现代码
2013/02/25 Javascript
javascript简单实现图片预加载
2014/12/03 Javascript
Bootstrap教程JS插件弹出框学习笔记分享
2016/05/17 Javascript
JQuery的常用选择器、过滤器、方法全面介绍
2016/05/25 Javascript
jQuery插件fullPage.js实现全屏滚动效果
2016/12/02 Javascript
使用socket.io制做简易WEB聊天室
2018/01/02 Javascript
jquery实现动态创建form并提交的方法示例
2019/05/27 jQuery
extjs4图表绘制之折线图实现方法分析
2020/03/06 Javascript
JavaScript运行机制实例分析
2020/04/11 Javascript
详解vue3.0 的 Composition API 的一种使用方法
2020/10/26 Javascript
[15:09]DOTA2国际邀请赛采访专栏:Loda
2013/08/06 DOTA
在Python中使用元类的教程
2015/04/28 Python
浅谈Python单向链表的实现
2015/12/24 Python
利用Python如何生成hash值示例详解
2017/12/20 Python
使用Python实现从各个子文件夹中复制指定文件的方法
2018/10/25 Python
Python中一些深不见底的“坑”
2019/06/12 Python
Pandas之DataFrame对象的列和索引之间的转化
2019/06/25 Python
使用 Python 清理收藏夹里已失效的网站
2019/12/03 Python
matlab灰度图像调整及imadjust函数的用法详解
2020/02/27 Python
PyQt5 控件字体样式等设置的实现
2020/05/13 Python
[原创]赚疯了!转手立赚800+?大佬的python「抢茅台脚本」使用教程
2021/01/12 Python
美国儿童珠宝在线零售商:Loveivy
2019/05/22 全球购物
MYSQL基础面试题
2012/05/13 面试题
科级干部考察材料
2014/02/15 职场文书
民政局个人整改措施
2014/09/24 职场文书
小学四年级学生评语
2014/12/26 职场文书
大三学生英语考试作弊检讨书
2015/01/01 职场文书
恋恋笔记本观后感
2015/06/16 职场文书
Python中递归以及递归遍历目录详解
2021/10/24 Python
详解Spring Security如何在权限中使用通配符
2022/06/28 Java/Android