Editor rich text editor configuration [excluding image uploads], Editor does not include image uploads

Source: Internet
Author: User

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">

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.