1.把kindeditor-4压缩包解压出来,整个解压包放到项目中,比如根目录下/Scripts/把js引用的路径对应的修改下!(博客的文件栏目中已经上传)

2.如下的js引用copy过去到相应的页面中

<script type="text/javascript" charset="utf-8" src="/Scripts/kindeditor-4/kindeditor.js"></script>
<script type="text/javascript" charset="utf-8" src="/Scripts/kindeditor-4/lang/zh_CN.js"></script>
<script type="text/javascript">
    var editor;
    KindEditor.ready(function(K) {
        editor = K.create('#platformContent');  //platformContent为<textarea>的id
        K('#frm').bind('submit', function() {     //frm为表单的id
            editor.sync();
        });

    });
</script>

3.注意id="platformContent"一定要跟上面js中一致
<textarea name="platformContent" id="platformContent" style="width:680px;height:300px;visibility:hidden;">
<?php echo $v['content'];?>
</textarea>

posted on 2014-06-19 10:53  幸福没折扣  阅读(155)  评论(0编辑  收藏  举报