ASP 编写 TinyMCE编辑器 上传组件

2014-11-14 0 410
ASP 编写 TinyMCE编辑器 上传组件
/**
 * $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);
})();

遇见资源网 ASP/Basic ASP 编写 TinyMCE编辑器 上传组件 http://www.ox520.com/13342.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务