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
  • 相关阅读:
    UrlRewriter配置IIS支持伪静态
    Linux 安装PAE内核
    Tmux入门教程
    Tmux与Oh-my-zsh环境整合
    MySQL Route负载均衡与读写分离Docker环境使用
    MySQL数据表的基本操作
    Git安全配置
    GitLab使用自定义端口
    Gitlab搭建安装及使用中遇到的问题。
    执行Docker命令报错解决办法
  • 原文地址:https://www.cnblogs.com/wangbin/p/1946889.html
Copyright © 2011-2022 走看看