日期:2014-05-16 浏览次数:20724 次
createToolbar : function(editor) { HTMLEditor.superclass.createToolbar.call(this, editor); this.tb.insertButton(16, { cls : "x-btn-icon", icon : "images/icos/addimage.gif", handler : this.addImage, tooltip : { title:'AddImage', text:'插入图片' }, scope : this }); this.tb.insertButton(17, { cls : "x-btn-icon", icon : "images/icos/addfile.gif", handler : this.addFile, tooltip : { title:'AddFile', text:'插入xls、doc、rar文件' }, scope : this }); this.tb.insertButton(18, { cls : "x-btn-icon", icon : "images/icos/comment_edit.gif", handler : this.addCode, tooltip : { title:'AddCode', text:'引用格式' }, scope : this }); } }); Ext.reg('StarHtmleditor', HTMLEditor); //判断是否是图片类型 function CheckFileExt(extstr,exg) { var extstr = extstr.substring(extstr.lastIndexOf(".")).toLowerCase(); if (!extstr.match(exg)) { return false; } return true; }