ecshop将编辑器更换为kindeditor

因为ecshop原版fckeditor编辑器过于陈旧,就有想法要更新编辑器,最开始想到的是ueditor,可是最后没法获取编辑器内的值,最后放弃.而后就转至kindeditor.php

方法也是在网上搜索到的,并测试正常.可是最后就找不到原做者是谁.html

具体的步骤以下:asp.net

1.下载kindeditor.jsp

2.解压到includes文件夹下.编辑器

3.删除无用文件夹.asp/asp.net/jsp/examples 测试

4.admin\goods.php  416行左右  spa

create_html_editor('goods_desc', $goods['goods_desc']);

 这个调用方法注释.   加入  .net

$FCKeditor = create_html_kindeditor('goods_desc', $goods['goods_desc'], 'theForm');    
$smarty->assign('FCKeditor',    $FCKeditor);

5.admin\includes\lib_main.phpcode

加入orm

function create_html_kindeditor($input_name, $input_value = '', $form_name = '')
{
    global $smarty;

    $kindeditor="<script charset='utf-8' src='../includes/kindeditor/kindeditor-min.js'></script>
    <script>
        var editor;
            KindEditor.ready(function(K) {
                editor = K.create('textarea[name=\"$input_name\"]', {
                    allowFileManager : true,
                    width : '700px',
                    height: '300px',
                    resizeType: 0   //固定宽高
                });
            });
    </script>
    <textarea id=\"$input_name\" name=\"$input_name\" style='width:700px;height:300px;'>$input_value</textarea>
    ";
    return $kindeditor;
}

6.admin\templates\good_info.htm

大约429行  提交按钮  type更换才submit

7.大功告成

相关文章
相关标签/搜索