修改 /statics/js/swfupload/swf2ckeditor.js两个函数:
function submit_ckeditor(uploadid,textareaid){ var d = window.top.art.dialog({id:uploadid}).data.iframe; var in_content = d.$("#att-status").html(); var del_content = d.$("#att-status-del").html(); var att_name = d.$("#att-name").html(); //add here insert2editor(textareaid,in_content,del_content,att_name) }
function insert2editor(id,in_content,del_content,att_name) { if(in_content == '') {return false;} var data = in_content.substring(1).split('|'); var dataname = att_name.substring(1).split('|'); var img = ''; for (var n in data) { img += IsImg(data[n]) ? '<img src="'+data[n]+'" /><br />' : (IsSwf(data[n]) ? '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="movie" value="'+data[n]+'" /><embed pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="'+data[n]+'" type="application/x-shockwave-flash" width="460"></embed></object>' :'<a href="'+data[n]+'" title="'+dataname[n]+'"/>'+dataname[n]+'</a><br />') ; } $.get("index.php?m=p_w_upload&c=p_w_uploads&a=swfdelete",{data: del_content},function(data){}); CKEDITOR.instances[id].insertHtml(img); }
转载于:https://blog.51cto.com/will2013/1272483