zoukankan      html  css  js  c++  java
  • js中的文本编辑器控件KindEditor

      使用文本编辑器控件KindEditor渲染文本域页面显示

          this.sync()同步KindEditor的值到textarea文本框

      editor.isEmpty()判断文本域是否是空

          editer.text()获取文本域的值

    //内容编辑器
    var editor;
    KindEditor.ready(function(K) {
        var basePath = $(window.parent.document).find('#contextPath').val();
        editor = K.create("#txt", {
            uploadJson:  basePath + '/mcrs-upload/mvc/fileupload/editorUpload.json',
            620,
            afterChange: function() {
                this.sync();
                ifrHeight();
            }
        });
    });
    
    var content = editor.isEmpty();
                if(content){
                    dynamicAlert(message.serviceCenter.contentIsNotNull, message.defaults.tipTitle);
                    return;
                }
                if(editor.text().length > 200){
                    dynamicAlert(message.news.contentMaxlength, message.defaults.tipTitle);
                    return;
                }

    官网:http://kindeditor.net/demo.php

  • 相关阅读:
    Android
    Android
    Android
    Android
    Android
    Android
    Android
    Android
    Android
    Android
  • 原文地址:https://www.cnblogs.com/wanghongye/p/5626983.html
Copyright © 2011-2022 走看看