zoukankan      html  css  js  c++  java
  • KendEditor 加载回复编辑框

    1 //加载回复编辑框
    2  KE.init({
    3 id : 'Comments',
    4 afterCreate : function(id) {
    5 KE.util.focus(id);
    6 },
    7 resizeMode : 1,
    8 allowPreviewEmoticons : false,
    9 allowUpload : false,
    10 autoSetDataMode : true,
    11 items : [
    12 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
    13 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
    14 'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
    15 afterSetData : function(id) {
    16 if(KE.count(id, 'text')>=10){
    17 $("#btn_comment").unbind('click').removeAttr('onclick').click(function(){ });
    18 }else{
    19
    20 }
    21 if(KE.count(id, 'text')>=300){
    22 KE.$('comment_result').innerHTML = '<span class="redfont">输入的字数不能多于300个</span>';
    23 $("#btn_comment").unbind('click').removeAttr('onclick').click(function(){ alert('输入的字数不能多于300个');return false;});
    24 }else if(KE.count(id, 'text')<=10){
    25 KE.$('comment_result').innerHTML = '当前输入' + KE.count(id, 'text') + '个字<span class="redfont">不能少于10个字</span>';
    26 }else{
    27 $("#btn_comment").unbind('click').removeAttr('onclick').click(function(){ });
    28 KE.$('comment_result').innerHTML = '当前输入' + KE.count(id, 'text') + '个字';
    29 }
    30 }
    31 });
    32 //回复引用
    33 function groupquote(id,sign){
    34 javascript:KE.remove('Comments');
    35 $("#Comments").val($("#gbody_"+id).html());
    36 javascript:KE.create('Comments');
    37 }
    38 </script>

    aliyun活动 https://www.aliyun.com/acts/limit-buy?userCode=re2o7acl
  • 相关阅读:
    模板学习系列(一)tuple
    apue读书笔记第十章
    在亚马逊上关于设计模式的一个评论
    编程珠玑笔记第12章习题
    编程珠玑第14章
    C#,.Net经典面试题目及答案
    sql where 1=1和 0=1 的作用(junyuz)
    快速排序算法
    一道面试题(C#实现了超大整数的加减乘法运算)
    数据结构实验之链表一:顺序建立链表
  • 原文地址:https://www.cnblogs.com/wangbin/p/1946889.html
Copyright © 2011-2022 走看看