解决ueditor编辑器图片在线管理图片无法显示
2016-09-22 13:00
453 查看
使用ueditor,点击在线管理,服务器图片路径显示不正确,如下图所示
查看源码,如下:
发现图片src中中间多了一长串的项目跟路径,解决的办法是
把 jsp/controller.jsp 里面的代码修改一下
在线管理图片马上就显示出来了,如下图
查看源码,如下:
发现图片src中中间多了一长串的项目跟路径,解决的办法是
把 jsp/controller.jsp 里面的代码修改一下
<%@ page language="java" contentType="text/html; charset=UTF-8" import="com.baidu.ueditor.ActionEnter" pageEncoding="UTF-8"%> <%@ page trimDirectiveWhitespaces="true" %> <% request.setCharacterEncoding( "utf-8" ); response.setHeader("Content-Type" , "text/html"); String rootPath = application.getRealPath( "/" ); String action = request.getParameter("action"); String result = new ActionEnter( request, rootPath ).exec(); if( action!=null && (action.equals("listfile") || action.equals("listimage") ) ){ rootPath = rootPath.replace("\\", "/"); result = result.replaceAll(rootPath, "/"); } out.write( result ); %>然后改config.json
/* 列出指定目录下的图片 */ "imageManagerActionName": "listimage", /* 执行图片管理的action名称 */ "imageManagerListPath": "/ueditor/jsp/upload/image/", /* 指定要列出图片的目录 */ "imageManagerListSize": 20, /* 每次列出文件数量 */ "imageManagerUrlPrefix": "/ueditor", /* 图片访问路径前缀 */ "imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */ "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */
在线管理图片马上就显示出来了,如下图
相关文章推荐
- 解决ueditor编辑器图片在线管理图片无法显示
- 解决ueditor编辑器图片在线管理图片无法显示
- 解决ueditor编辑器图片在线管理图片无法显示
- 解决ueditor百度富文本编辑器图片可以上传但是在线管理图片无法显示
- ueditor1.4.3jsp版成功上传图片后却回显不出来与在线管理显示不出图片的解决方案
- JSP UEditor图片在线管理及预览时图片路径问题解决
- ueditor 图片在线管理显示不了
- ueditor 图片在线管理显示不了发现是返回的物理路径“/”问题,在controller.jsp里做如下修改
- 删除百度Ueditor编辑器 在线管理 图片搜索 功能
- windows下ueditor1.4.3.3 jsp 版本在线管理图片显示问题。 3ff8
- word 2007无法显示图片的问题解决了
- 解决网通英文wiki无法显示图片问题【20100723更新】
- 网页无法显示PNG图片的解决办法
- 解决 asp.net 伪静态 编辑器无法显示问题
- 解决博易博客后台文章管理页面无法显示分页的问题
- 解决IE6下透明PNG图片无法透明显示的方法
- 在IE8中无法在https协议下显示图片的解决办法
- picasa相册无法显示图片的解决办法
- IE无法显示PNG格式图片的解决
- 使用Form验证,未登录时登录页面无法显示图片、css、js文件的解决方法