zoukankan      html  css  js  c++  java
  • 牛腩购物6 kindeditor 编辑器的使用

  • 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 

查看全文
  • 相关阅读:
    CentOS 6找不到partprobe命令的解决方法
    RTL源码归类与路径
    拓扑排序
    Char、AnsiChar、WideChar、PChar、PAnsiChar、PWideChar 的区别
    Delphi Byte与数据类型之间的转换
    Delphi byte[]转换为int
    Delphi Byte数组与Int String之间的相互转换
    delphi TTcpClient TTcpServer分析
    Delph7中TcpClient和TcpServer用法分析
    动态数组的使用
  • 原文地址:https://www.cnblogs.com/iceicebaby/p/2381674.html
  • Copyright © 2011-2022 走看看