laf47最后的女主角:kindeditor的使用及遇到的问题处理

来源:百度文库 编辑:偶看新闻 时间:2024/05/03 09:38:33
首先在jsp页面引入kindeditor.js在js中调用KE.show({
    id : 'content',
    resizeMode : 1,
    allowPreviewEmoticons : false,
    allowUpload : false,
    items : [
    'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
    'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
    'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
    afterChange : function(id) {//内容改变时的回调
     //KE.$('word_count1').innerHTML = KE.count(id);
     KE.$('word_count2').innerHTML = KE.count(id, 'text');//统计内容字数
    }
   });  
      

      你最多能输入200个字符,
      
      当前输入了
      0
      个文字。(字数统计包含纯文本、IMG、EMBED,不包含换行符,IMG和EMBED算一个文字。)遇到的问题:在java中用request.getParameter("content")时获取不到内容,在调用java保存方法前调用一下js,KE.sync('content');//把内容赋值给textarea