使用Ueditor时遇到的问题汇总

  1. 在使用编辑器时,会出现点击添加图片或者添加附件时发现没有反应,其实是因为被编辑器的图层给覆盖了,修改一下。
    在ueditor.config.js中的zIndex:的值修改为9999如果还是不可以的话,可以多加几个9,一定可以的。

  2. **浏览器中报错:请求后台配置项http错误,上传功能将不能正常使用!**
    

    有五个需要用的包,要放在WEB-INF/lib

  3. Uncaught ReferenceError: errorHandler is not defined。
    出现这个问题的原因是因为我们在config.json中使用了//作为注释符

  4. ueditor宽度无法自适应。
    在ueditor.config.js中设置initialFrameWidth:'100% ’

  5. 修改最大字符。
    在ueditor.config.js中设置maximumWords:100000

  6. 多图上传中在线管理图片不能正常显示。
    在这里插入图片描述
    修改jsp/config.jsp 替换之前的代码为:

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 );
  1. 去掉多图上传中的图片搜索功能。
    1)打开ueditor1.4.3\dialogs\image\image.html
    2)删除第25行

    <span class="tab" data-content-id="search">
    <var id="lang_tab_search"></var>
    </span>
    

    3)删除第101到114行:

    <div id="search" class="panel">
    ...
    </div>
    
  2. 去掉保存图片时的alt
    1)打开ueditor1.4.3\dialogs\image\image.js
    2)查找有关alt的代码并注释掉

  3. 插入图片自适应编辑框大小
    在ueditor.all.js中添加红边框这句话

在这里插入图片描述

  1. ueditor上传图片插入正文后如何默认居中
    在这里插入图片描述
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值