mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
1 line
No EOL
1 KiB
JavaScript
1 line
No EOL
1 KiB
JavaScript
function ckInsertUploadedFile(a){var b="",c=uploaderSettings[a],d=c.fileListAreaID,e=get_by_id(d);if(e&&"preview"!=editorMode[a]){for(var f=0;f<e.options.length;f++)if(e.options[f].selected){var g=e.options[f].value;if(g){var h=uploadedFiles[g];if("Y"==h.direct_download)if(/\.(jpg|jpeg|png|gif)$/i.test(h.download_url)){if(loaded_images[g])var i=loaded_images[g];else{var i=new Image;i.src=h.download_url}b+='<img src="'+h.download_url+'" alt="'+h.source_filename+'"',1==i.complete&&(b+=' width="'+i.width+'" height="'+i.height+'"'),b+=" />\r\n"}else b='<img src="common/img/blank.gif" editor_component="multimedia_link" multimedia_src="'+h.download_url+'" width="400" height="320" style="display:block;width:400px;height:320px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center;" auto_start="false" alt="" />';else b='<a href="'+h.download_url+'">'+h.source_filename+"</a>\n"}}cked_instance="ckeditor_instance_"+a,CKEDITOR.instances[cked_instance].insertHtml(b)}} |