zoukankan      html  css  js  c++  java
  • asp.net中kindeditor配置

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>KindEditor</title>
        <link rel="stylesheet" href="./js/kindeditor/themes/default/default.css" />
        <script src="js/jquery-1.11.1.min.js" type="text/javascript"></script>
        <script charset="utf-8" src="./js/kindeditor/kindeditor.js"></script>
        <script charset="utf-8" src="./js/kindeditor/lang/zh_CN.js"></script>
        <script>
            KindEditor.ready(function (K) {
                var editor = K.create('#editor_id', {
                    //上传管理 可自行在对应的文件按需求修改
                    uploadJson: './js/kindeditor/asp.net/upload_json.ashx',
                    //文件管理
                    fileManagerJson: './js/kindeditor/asp.net/file_manager_json.ashx',
                    allowFileManager: true,
                    //设置编辑器创建后执行的回调函数
                    afterCreate: function () {
                        var self = this;
                        K.ctrl(document, 13, function () {
                            self.sync();
                            K('form[name=example]')[0].submit();
                        });
                        K.ctrl(self.edit.doc, 13, function () {
                            self.sync();
                            K('form[name=example]')[0].submit();
                        });
                    },
                    //上传文件后执行的回调函数,获取上传图片的路径
                    afterUpload: function (url) {
                        alert(url);
                    },
                    items:
                    [
                            'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', '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', 'multiimage',
                            'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
                            'anchor', 'link', 'unlink', '|', 'about'
                    ]
                });
            });
        </script>
    </head>
    <body>
        <div>
        <textarea id="editor_id" name="editor_id" style="700px;height:300px;">
        </textarea>
        </div>
    </body>
    </html>

  • 相关阅读:
    [51nod1299]监狱逃离
    [51nod1206]Picture
    noi 2016 游记
    [Codeforces 696D] Legen...
    [bzoj2574] [Poi1999]Store-Keeper
    [bzoj1227] [SDOI2009]虔诚的墓主人
    [bzoj3979] [WF2012]infiltration
    Docker
    SpringBoot实现登录
    SpringBoot第一次案例
  • 原文地址:https://www.cnblogs.com/smartsmile/p/6234169.html
Copyright © 2011-2022 走看看