即时通讯使用tinymce 4,现在可以上传图片或文件
这是我的代码,
tinymce.init({
selector: '.tinymce-long_desc',
menubar: false,
height: 1000,
plugins: plugins,
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media",
relative_urls: false,
file_browser_callback : function(field_name, url, type, win) {
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight;
var cmsURL = 'http://localhost/public/vendor/laravel-filemanager?field_name=' + field_name;
if (type == 'image') {
cmsURL = cmsURL + "&type=Images";
} else {
cmsURL = cmsURL + "&type=Files";
}
tinyMCE.activeEditor.windowManager.open({
file : cmsURL,
title : 'Filemanager',
width : x * 0.8,
height : y * 0.8,
resizable : "yes",
close_previous : "no"
});
}
});
我尝试几次更改此配置var cmsURL = 'http://localhost/public/vendor/laravel-filemanager?field_name=' + field_name;
,但没有运气,它显示404错误页面
请帮助。