菜单按钮可以显示gif动画吗?可以指定大小吗? 

解决方案 »

  1.   

    plugins文件夹下面一堆。
    随便参照一个 就能写出来。
      

  2.   

    刚没细看,以为你要添加自定义功能。
    如果只是想显示图片 你可以通过样式来解决。如果想通过js来修改。你在ckeditor.js 搜索n.push('<span class="cke_button' + (this.icon && this.icon.indexOf('.png') == -1 ? ' cke_noalphafix' : '') + '">', '<a id="', p, '" class="', q, '"', o.gecko && o.version >= 10900 && !o.hc ? '' : '" href="javascript:void(\'' + (this.title || '').replace("'", '') + "')\"", ' title="', this.title, '" tabindex="-1" hidefocus="true" role="button" aria-labelledby="' + p + '_label"' + (this.hasArrow ? ' aria-haspopup="true"' : ''));这段代码,你可以看到这里有个icon的判断。你可以添加一个自定义的属性 来显示自己的图片。
    比如a.ui.addButton&&a.ui.addButton("Smiley",{label:a.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50","iconCustom":true});通过判断iconCustom 来设置自己的图片
      

  3.   

    ckeditor 源码里面 显示图片的部分是写死的,就是上面我写出来的js代码。
    你只能通过修改ckeditor.js 来达到自己想要的效果。
      

  4.   

    用样式修改的图片的方法
    a.ui.addButton&&a.ui.addButton("Smiley",{label:a.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50",icon:"CustomSmiley"});这样ckedtor最后会生成一个cke_button_CustomSmiley的标签。
    你在样式文件 定义一个cke_button_CustomSmiley样式 就可以了。
      

  5.   

    toolbar:"insert,50",是用来做什么的?icon可以用gif动画吗?