• 牛腩购物6 kindeditor 编辑器的使用


    下载地址:http://www.kindsoft.net/down.php  

  • KindEditor 4.0.5 (2012-01-15) [665KB]

    我们下载这个版本,现在开始来制作

    1. web项目中根目录建立一个 kindeditor目录,把刚才下载解压的文件里面的 asp.net,lang,plugins,themes文件夹
      和lindeditor.js文件拷贝到 kindeditor文件夹中
      image   
      image
      打开kindeditor文件夹里面的 asp.net文件夹 里面的bin 文件夹,将 LitJSON.dll 放到web层的bin文件夹,或者是放到其他的文件夹,然后再web层上引用这个dll 。asp.net文件夹 只保留2个 ashx 文件。
      image


      1. 在 需要加入编辑器的页面,拖入 相关的js ,配置编辑器  例如我们在后台的 news_add.aspx 页面中 如下配置
        <script src="../kindeditor/kindeditor.js" type="text/javascript"></script>
            <
        script src="../kindeditor/lang/zh_CN.js" type="text/javascript"></script>
            <
        script type="text/javascript">
               
        KindEditor.ready(function (K) {
                    K.create('#txtBody', {
                        themeType: 'default',
                        uploadJson: K.basePath + 'asp.net/upload_json.ashx', /*这里是 上传的一般处理程序的路径为 编辑器的路径+asp.net文件夹+*/

                       
        fileManagerJson: K.basePath + 'asp.net/file_manager_json.ashx'/*这里是 文件管理的一般处理程序的路径为 编辑器的路径+asp.net文件夹+*/ allowFileManager: true,     /*允许文件管理*/
                       
        items: [
                'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'cut', 'copy', 'paste',
                'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
                'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
                'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'map', 'code', 'anchor', 'link', 'unlink', ]

                    });
                    
                    

                });
            </script>

    2. 修改kindeditor文件夹里面的asp.net文件夹里面的  file_manager_json.ashx 和  upload_json.ashx 的文件上传保存目录
      image
      image 

  • 相关阅读:
    js点击按钮触发事件的方法(含函数的写法)
    操作文件
    克隆别人的仓库,提交到自己的远程仓库的方法
    时间戳变成 标准时间展示的方法
    还没看的书
    print 和 println的区别
    初学java记录
    java 的一个hellow word 代码解释
    eclipse 创建一个java项目 运行
    Eclipse环境配置
  • 原文地址:https://www.cnblogs.com/iceicebaby/p/2381674.html
  • Copyright © 2020-2023  润新知