Editor rich text editor configuration [excluding image uploads], Editor does not include image uploads
1,: http://ueditor.baidu.com/website/download.html
1) download the corresponding version as needed
For example, Java: Select jsp + UTF-8;
2. Place it in the project
1) decompress the downloaded file and rename it to editor;
2) copy the file to the project webapp directory;
3) Cut the js files under the editor directory (3) and put them under your js file directory;
4) Copy all the files in the editor to the js directory (you can not copy the files, but the page will report a 404 error. It is estimated that you need to access other files during initialization)
3. Configure static resource ing
1) configure the relevant attributes in the Springmvc. xml configuration file (provided that the configuration has been configured in web. xml );
Web. xml configuration:
<Servlet>
<Servlet-name> portal </servlet-name>
<Servlet-class> org. springframework. web. servlet. DispatcherServlet </servlet-class>
<! -- ContextConfigLocation is not required. If contextConfigLocation is not configured,
Springmvc configuration file default in: WEB-INF/servlet name + "-servlet. xml" -->
<Init-param>
<Param-name> contextConfigLocation </param-name>
<Param-value> classpath: spring/springmvc. xml </param-value>
</Init-param>
<Load-on-startup> 1 </load-on-startup>
</Servlet>
<Servlet-mapping>
<Servlet-name> portal </servlet-name>
<Url-pattern>/</url-pattern>
</Servlet-mapping>
Springmvc Configuration:
<Mvc: resources mapping = "/umeditor/**" location = "/umeditor/"/>
<Mvc: resources mapping = "/js/**" location = "/js/"/>
4. Page Configuration
1) introduce the file in the head:
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Link href = "umeditor/themes/default/css/umeditor.css" type = "text/css" rel = "stylesheet">
<Script type = "text/javascript" src = "umeditor/third-party/jquery. min. js"> </script>
<Script type = "text/javascript" src = "umeditor/third-party/template. min. js"> </script>
<Script type = "text/javascript" charset = "UTF-8" src = "js/umeditor. config. js"> </script>
<Script type = "text/javascript" charset = "UTF-8" src = "js/umeditor. min. js"> </script>
<Script type = "text/javascript" src = "umeditor/lang/zh-cn/zh-cn.js"> </script>
2) Place the div in the Editor:
<! -- Text editor location -->
<Div id = "myEditor">