在ThinkPHP中加入百度编辑器Ueditor不能上传图片,如下图:
解决方法看代码:
window.UEDITOR_HOME_URL='__ROOT__/Data/Ueditor/';
window.οnlοad=function(){
window.UEDITOR_CONFIG.initialFrameHeight=400;
window.UEDITOR_CONFIG.initialFrameWidth=800;
window.UEDITOR_CONFIG.savePath = ['Uploads']; //多添加这么一行代码即可
window.UEDITOR_CONFIG.imageUrl="{:U(GROUP_NAME.'/Blog/upload')}";
window.UEDITOR_CONFIG.imagePath='__ROOT__/Uploads/';
UE.getEditor('content');
}