使用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的代码并注释掉

猜你喜欢

转载自blog.csdn.net/small_emotion/article/details/85000573