主题: 两种模式怎样共用
作者: 忆秋, 发布日期: 2012-10-25 22:09:09, 浏览数: 2075

  怎样简单模式和字数统计放在一起?

 var editor;
   KindEditor.ready(function(K) {
    editor = K.create('textarea[name="content"]', {
     pasteType : 1,
     resizeType : 1,
     allowPreviewEmoticons : false,
     allowImageUpload : false,
     items : [
      'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
      'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
      'insertunorderedlist', '|', 'emoticons', 'image', 'link','unlink','|','clearhtml','quickformat','fullscreen']
    });   }
   );

以上简单模式,

   KindEditor.ready(function(K) {
    K.create('textarea[name="content"]', {
     afterChange : function() {
      K('.word_count1').html(this.count());
      K('.word_count2').html(this.count('text'));
     }
    });
   });

字数的

盼回复!谢谢!

作者: 小浪子, 发布日期: 2012-10-25 23:00:45
var editor;
KindEditor.ready(function(K) {
    editor = K.create('textarea[name="content"]', {
        pasteType: 1,
        resizeType: 1,
        allowPreviewEmoticons: false,
        allowImageUpload: false,
        items: ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'emoticons', 'image', 'link', 'unlink', '|', 'clearhtml', 'quickformat', 'fullscreen'],
        afterChange: function() {
            K('.word_count1').html(this.count());
            K('.word_count2').html(this.count('text'));
        }

    });
});
回复
作者: 忆秋, 发布日期: 2012-10-26 09:29:11
谢谢解答!
回复
发表新帖 发表回复