`
hvang1988
  • 浏览: 49645 次
  • 性别: Icon_minigender_1
  • 来自: 河南
社区版块
存档分类
最新评论

umeditor图片上传位置修改

阅读更多
在umeditor.min.js引用之前加入以下代码
<script type="text/javascript">
window.UMEDITOR_HOME_URL = "${ctx }/js/umeditor/";
var URL=window.UMEDITOR_HOME_URL;
window.UMEDITOR_CONFIG = {
	UMEDITOR_HOME_URL : URL
	
	//图片上传配置区
	,imageUrl:"${ctx}/updown/imageup"             //图片上传提交地址
	,imagePath:"${ctx}/updown/imagedown?fileno="                    //图片修正地址,引用了fixedImagePath,如有特殊需求,可自行配置
	,imageFieldName:"upfile"                   //图片数据的key,若此处修改,需要在后台对应文件修改对应参数
	
	
	//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
	,toolbar:[
	    'source | undo redo | bold italic underline strikethrough | superscript subscript | forecolor backcolor | removeformat |',
	    'insertorderedlist insertunorderedlist | selectall cleardoc paragraph | fontfamily fontsize' ,
	    '| justifyleft justifycenter justifyright justifyjustify |',
	    'link unlink | emotion image video  | map',
	    '| horizontal print preview fullscreen', 'drafts', 'formula'
	]
	,autoHeightEnabled:false
};
</script>


然后移除umeditor.config.js的引用,以上代码就是覆盖umeditor.config.js内容
分享到:
评论
1 楼 hvang1988 2015-07-04  
路径可以随意修改了,每个页面都可以配置不同路径。

相关推荐

Global site tag (gtag.js) - Google Analytics