/**
* $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.51sjk.com/upload/articles/1/0/323/323431_20220817165934935.jpg',
version : "1.0"
};
}
});
// register plugin
tinymce.pluginmanager.add('upload_image', tinymce.plugins.uploadimageplugin);
})();
用户登录
还没有账号?立即注册
用户注册
投稿取消
| 文章分类: |
|
还能输入300字
上传中....
kop杰拉德