The first step: Download all the files required by Ueditor
The Jsp-utf-8 version is used here
Download Link: http://ueditor.baidu.com/website/download.html
Step two: Unzip the download file to the Project Web directory
Step three: Copy the five jar packages under the/jsp/lib directory under the folder to the Web-inf/lib in the project and add them to the project structure
Fourth Step: Modify Ueditor.config.js
The var URL = window. Ueditor_home_url | | Getuebasepath ();
Modify to var URL = "/project name/utf8-jsp/";
Fifth step: Modify the image upload path prefix--ueditor directory Jsp/config.json
Change "" to "/project name" after Imageurlprefix
Picture upload path is can change not change
Step Sixth: Test index.html See if the text Editor can be displayed correctly on the Web page
Step seventh: Load the Ueditor into the Web page
The first step: Add the following two lines of code to the page where you want to add the text editor, and introduce the text editor configuration and source file
<!--config file-->
<script type= "Text/javascript" src= "/cms/utf8-jsp/ueditor.config.js" ></script>
<!--editor source files-->
<script type= "Text/javascript" src= "/cms/utf8-jsp/ueditor.all.js" ></ Script>
Step two: Introduce the text editor in the following code mode
<div align= "center" >
<textarea id= "newseditor" name= "Content" style= "width:300px;height:200px" > </textarea>
<br/>
<script type= "Text/javascript" >
ue.geteditor (' newseditor ');
</script>
</div>
This approach is to create a text field as a container, then replace it with a text editor, and if you want to display existing content, add it to the textarea label and the counter tag
The eighth step: Open the Edit page, test whether the text editor can be normal display, test in the text to add pictures can be normal upload to the server corresponding items directory, if you can, Ueditor can already be used normally.