ASP 编写 TinyMCE编辑器 上传组件

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

/**
 * $Id: editor_plugin.js 201 2008-02-2 Guangzhou $
 */

(function() {
tinymce.PluginManager.requireLangPack('upload_image');
tinymce.create('tinymce.plugins.UploadImagePlugin', {
createControl: function(n, cm) {
switch (n) {
case 'upload_image':
var mlb = cm.createListBox('upload_image', {
title : 'upload.title',
onselect : function(v) {
var arr = document.cookie.match(new RegExp("(^| )SID=([^;]*)(;|$)"));
var site = (arr != null)?unescape(arr[2]):null;
if(v=='insert')	                     		
tinyMCE.activeEditor.execCommand('mceImage', true);
else if(v=='upload'){
var url = '/mceUpload.asp';
tinyMCE.activeEditor.windowManager.open({file:url,width:400,height:230,inline:1});
}}
});

// Add some values to the list box
mlb.add('upload.upload_image', 'upload');
mlb.add('upload.insert_image', 'insert');

// Return the new listbox instance
return mlb;	
}
	
return null;
},
	    
getInfo : function() {
return {
longname : 'Upload Image plugin',
author : 'Winter Lau',
authorurl : 'http://www.oschina.net/',
version : "1.0"
};
}
});

// Register plugin
tinymce.PluginManager.add('upload_image', tinymce.plugins.UploadImagePlugin);
})();