百度编辑器中返回的是我们server中的url,有时并非我们须要的,比方图文编辑中。我想在线浏览上传过的图片 ,那么我返回的应该是腾讯server上面的url。这样才不会被腾讯的过滤器过来掉,全部我们就须要改动在线管理的图片获取路径详细操作例如以下:

BaseState fileState = null;



File file = null;

String realpath= null;

for ( Object obj : files ) {

if ( obj == null ) {

break;

}

file = (File)obj;

fileState = new BaseState( true );

realpath=  PathFormat.format( this.getPath( file ) );

//fileState.putInfo( "url", PathFormat.format( this.getPath( file ) ) );

//TODO  处理列出的图片信息

String url=UploadToTX.urlSelect(realpath);

fileState.putInfo( "url", url);



state.addState( fileState );

}



return state;

改动后的在线浏览还是浏览不出来,还须要改动对话框中的js文件。改动/ueditor/dialogs/image/image.js以下的js就能够了。不然会显示图片引用未授权。

//TODO

                    //img.setAttribute('src', urlPrefix + list[i].url + (list[i].url.indexOf('?') == -1 ? '?noCache=':'&noCache=') + (+new Date()).toString(36) );

                    img.setAttribute('src', urlPrefix + list[i].url );

最新文章

  1. sql2008备份集中的数据库备份与现有的xxx数据库不同解决方法
  2. Windows7+VS2012下OpenGL 4的环境配置
  3. C# 多线程操作样例
  4. leetcode:Rectangle Area
  5. 转载-KMP算法前缀数组优雅实现
  6. 使用for xml path 分组查询
  7. 光盘卡在MacBook里退不出来咋办?
  8. 转:SRIO错误侦测和管理机制
  9. 使用MBROSTool 工具制作U盘多启动盘的方法总结
  10. string转QBytearray
  11. swagger.core的使用方法
  12. PHP手动搭建环境
  13. 服务器RAID设置以及简单理解
  14. php mysqli 的使用方法
  15. C# 值类型
  16. Arduino入门笔记(3):单LED闪烁
  17. 开发JAVA9以上的项目时,出现ClassNotFoundException: javax.xml.bind.JAXBException的解决方法
  18. JDBC选择数据库实例
  19. 获取设备和 App 信息
  20. 2018.07.06 POJ1273 Drainage Ditches(最大流)

热门文章

  1. python 3.7 replace函数的坑
  2. linux 免密登陆(超简单)
  3. docker(二):CentOS安装docker
  4. html/css常用合集
  5. WPF使用Winform PDFView控件
  6. VPU硬编码
  7. VTK+MFC 系列教程 非常强大
  8. 将数据库返回的ResultSett转换成List装Map形式的方法(ResultSetToList)
  9. JavaScript数组操作函数
  10. Zookeeper 使用