+ 收藏我们

网站模板

网站模板搜索
404模板 营销型模板 外贸网站模板 单页模板 双语模板 标签大全

注册

ecshop编辑器fckeditor换百度ueditor编辑器教程

AB模板网 / 2015-06-07
1、下载uediter编辑器,解压上传目录uediter到根目录/includes/下
 
2、修改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;  
   //www.zuimoban.com
    $kindeditor=" 
    <script id='editor' name='$input_name' type='text/plain' style='width:1024px;height:500px;'>$input_value</script> 
    <script type='text/javascript' charset='utf-8' src='../includes/ueditor/ueditor.config.js'></script> 
    <script type='text/javascript' charset='utf-8' src='../includes/ueditor/ueditor.all.min.js'> </script> 
    <script type='text/javascript' charset='utf-8' src='../includes/ueditor/lang/zh-cn/zh-cn.js'></script> 
    <script> 
        var ue = UE.getEditor('editor'); 
        UE.getEditor('editor').focus(); 
    </script> 
 <input type=\"submit\" value=\"提交\" /> 
    ";  //zuimoban
    $smarty->assign('FCKeditor', $kindeditor);
}  
 
 
3、修改admin/templates/pageheader.htm
 
将:
 
 
{insert_scripts files="../js/transport.js,common.js,../js/utils.js"}  
替换为:
 
 
 
<script type="text/javascript" src="../includes/ueditor/fix_jquery/jquery.min.js" rel="stylesheet" /></script>  
<script type="text/javascript" src="../includes/ueditor/fix_jquery/jquery.json-1.3.js" rel="stylesheet" /></script>  
<script type="text/javascript" src="js/common.js" rel="stylesheet" /></script>  
<script type="text/javascript" src="../includes/ueditor/fix_jquery/transport_json.js" rel="stylesheet" /></script>  
{insert_scripts files="../js/utils.js"}  
 
4、解决商品编辑中编辑器被重置,uedite无法保存内容的bug。
 
admin/templates/goods_info.htm
 
找到
 
document.forms['theForm'].reset();  
修改为:
 
//document.forms['theForm'].reset();  
 
下载:  http://pan.baidu.com/s/1hqGLeLm
密码: qjuw 
 
文件中已含js冲突修改文件,另外已修改php/config.json中的图处保存路径,用户也可以自行修改!
文章搜集与网络,如有侵权请联系本站,转载请说明出处:https://www.adminbuy.cn/ecshopjc/1200.html

有问题可以加入网站技术QQ群一起交流学习

本站vip会员 请加入AB模板网 VIP群(577645397) PS:加入时备注用户名或昵称

普通注册会员或访客 请加入AB模板网 技术交流群(818577662)

客服微信号:wwwadminbuycn

☉首先声明,只要是我们的vip会员全站所有资源均可以免费下载,不做任何限制(了解更多)

☉本站的源码不会像其它下载站一样植入大量的广告。

☉本站提供的网站源码,都是做好测试好发布的,均可放心使用。

☉本站提供的网站源码,均带数据及演示地址。可以在任一源码详情页查看演示地址。

☉为了vip利益的最大化,我们还提供了vip赠品(了解更多

☉如有其他问题,请加网站客服QQ(9490489)进行交流。

首页 pbootcms模板 html模板 会员中心
 
QQ在线咨询

推荐添加下面的微信客服

添加微信客服