我对plupload的工作有问题: 我在MozieMannager插件的一页上嵌入了tinyMCE,在同一页上有Plupload(用于上传文件)。
因此Plupload可以工作,但是如果您激活Moxiemanager(在页面上),那么一切立即停止工作吗?如何绕过此限制?
代码示例:
<script type="text/javascript" src="./plupload/plupload.full.min.js"></script>
<script src="tinymce/tinymce.min.js"></script>
<script>tinymce.init({
selector:'<?php print $MCE3; ?>',
toolbar: "<?php print $MCE2; ?>",
language: 'ru',
plugins: '<?php print $MCE; ?>',
relative_urls : true,
document_base_url : "<?php print $url; ?>"
});</script>
<a data-action='uploadFile' class="ipsButton ipsButton_small ipsButton_primary ipsPos_left" id="pickfiles" href="javascript:;">Выбрать файл...1</a>
<a data-action='uploadFile' class="ipsButton ipsButton_small ipsButton_primary ipsPos_left" id="uploadfiles" href="javascript:;">Загрузить на сервер</a>
<ul id="filelist"></ul>
<pre id="console"></pre>
<script type="text/javascript">
// Custom example logic
var uploader3 = new plupload.Uploader({
runtimes : 'html5,flash,silverlight,html4',
browse_button : 'pickfiles', // you can pass in id...
container: document.getElementById('container'),
url : "./plupload/examples/q1.php?pgid=<?php print $pgid; ?>",
filters : {
pgid: <?php print $pgid; ?>,
max_file_size : '10mb',
mime_types: [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
]
},
// Flash settings
flash_swf_url : '/plupload/Moxie.swf',
// Silverlight settings
silverlight_xap_url : '/plupload/Moxie.xap',
init: {
PostInit: function() {
document.getElementById('filelist').innerHTML = '';
document.getElementById('uploadfiles').onclick = function() {
uploader3.start();
return false;
};
},
FilesAdded: function(up, files) {
plupload.each(files, function(file) {
document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>';
});
},
UploadProgress: function(up, file) {
document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
},
Error: function(up, err) {
document.getElementById('console').innerHTML += "\nError #" + err.code + ": " + err.message;
}
}
});
uploader3.init();
</script>
请帮助解决问题