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

2016-06-20 443

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

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.dhaomu.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=\"提交\" /> 
    ";  //www.dhaomu.com
    $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();  

声明: 本站仅提供资源学习下载,资源费用仅为赞助站长的整理费,不代表资源自身价值也不包含任何服务。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
本站提供的资源来自网络,版权争议与本站无关,所有内容及软件的文章仅限用于学习和研究目的。
如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。侵删请致信E-mail:duhaomu@163.com

浩沐资源网 ecshop技巧 ecshop教程编辑器fckeditor换百度ueditor编辑器教程 https://www.dhaomu.com/5488.html

相关文章

发表评论
暂无评论
  • 0 +

    访问总数

  • 0 +

    会员总数

  • 0 +

    文章总数

  • 0 +

    今日发布

  • 0 +

    本周发布

  • 0 +

    运行天数

浩沐资源网-打造全网优质免费教程资源分享网站!