zoukankan      html  css  js  c++  java
  • Kindeditor初始化、及初始化编辑内容

    一、Kindeeitor
    - 下载好后放入指定文件夹 引用
    <head>
        <meta charset="UTF-8">
        <title>NewsAdd</title>
        <link href="/static/bootstrap3/css/bootstrap.css" rel="stylesheet">
        <link href="/static/plugins/sweetalert/sweetalert.css" rel="stylesheet" />
        <script type="text/javascript" src="/static/kindeditor/kindeditor-all-min.js"></script>
    </head>
    
    • 初始化
            KindEditor.ready(function (k) {
                editor=k.create(
                    "#article-content",
                    {
                        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',
                                 'insertfile', 'table', 'hr', 'pagebreak',
                                'anchor', 'link', 'unlink'
                        ],
                        allowPreviewEmoticons : false,
                        // 去掉远程上传的功能
                        allowImageRemote : false,
                        uploadJson : '/upload/image/',
                        afterBlur: function () { this.sync(); }
                    }
                );
    
            });
    
    • 初始化编辑内容
            var initInterval = setInterval(function () {
                if(articleObj!=null&&editor!=null){
                    editor.html(articleObj.content.replace(/
    	/g,''));
                    editor.sync();
                    clearInterval(initInterval);
                }
            },100);
    
  • 相关阅读:
    git ssh keys
    git 修改 email
    git 撤销commit
    企微调试模式
    ORACLE 根据某个字段固定值进行分区
    Apache FtpClient login失败
    Oracle序列
    Oracle merage into
    Oracle all_tables 以及常用sql
    性能优化-使用高性能的库fastutil
  • 原文地址:https://www.cnblogs.com/shiqi17/p/12343517.html
Copyright © 2011-2022 走看看