读书人

百度ueditor使用意得

发布时间: 2013-10-23 11:39:13 作者: rapoo

百度ueditor使用心得
包自己下载,此处有提供;
ueditor难度在于图片和附件的上传配置。
1、


2、编辑框的实例化,js代码:

3、需注意到的是为编辑框赋值:

然后就是jsp页面的处理
imageUp.jsp如下:
String path = "\\upload";String imgStr ="";String realpath = getRealPath(request,path)+"/";List<File> files = getFiles(realpath,new ArrayList());for(File file :files ){imgStr+=file.getPath().replace(getRealPath(request,path),"")+"ue_separate_ue";}if(imgStr!=""){        imgStr = imgStr.substring(0,imgStr.lastIndexOf("ue_separate_ue")).replace(File.separator, "/").trim();    }out.print(imgStr);

读书人网 >Web前端

热点推荐