// 库模板  begin
KindEditor.plugin('nsylibrary', function(K) {
			var self = this, name = 'nsylibrary',lang = self.lang(name + '.');
			self.plugin.nsylibrary = {
	            edit : function() {
		            var html = [
			            '<div style="padding:20px;">',
			            //库模板选择加载
			            '<div class="ke-dialog-row">',
			            '<label>'+lang.library+'</label><iframe id="d_nsylibrary" name="d_nsylibrary" frameborder="0" src="../Wpedt/WpdccEditor/plugins/nsylibrary/nsyitemlibrary.aspx" width="100%" height="50px" scrolling="no" ></iframe>',
			            '</div>',
			            '</div>'
		            ].join('');
		            var dialog = self.createDialog({
			            name : name,
			            width : 300,
			            title : self.lang(name),
			            body : html,
			            yesBtn : {
				            name : self.lang('yes'),
				            click : function(e) {
        						
					            var libraryid=1;
					            var libraryname="";
					            try {
					                libraryid = frames['d_nsylibrary'].myform.d_library.value;
					                libraryname=frames['d_nsylibrary'].myform.d_library.options[frames['d_nsylibrary'].myform.d_library.selectedIndex].text;//选中栏目的text
                                }catch(e){
                                   alert(e.message);
                                }
                                //库模板参数
					            var html = "<button id=\"QXNSY2005\" name=\"003?librariesTemplateId="+libraryid+"\" style=\"WIDTH: 200px;\" >"+lang.show+"="+libraryname+"</button>";
					            self.insertHtml(html).hideDialog().focus();
					            
				            }
			            }
		            }),
		            div = dialog.div;
		            //加载右键菜单
		            var img = self.plugin.getSelectedNsylibrary();
		            if(img)
		            {
		                
		            }
		            
	            }
	            
            };
	    //加载控件
	    self.clickToolbar(name, self.plugin.nsylibrary.edit);
		});

// 库模板  end