UEditor official website Download: https://ueditor.baidu.com/website/download.html
Here I downloaded version jsp version of UTF-8, then after decompression the compressed like this
extract the contents of index.html is a rich text provides us with the use of official routine, open the page you can experience a variety of rich text manipulation
Next UEditor applied to our own projects
1, create a new dynamic Web project
2 will be extracted to UEditor WebContent directory files are copied to the new construction
at this time will complain, do not worry. The reason is that we have not UEditor will need to use the jar package added to the project environment.
Next, open the directory jsp-> lib, lib will be following all the jar packages copied to all the WEB-INF / lib file, eclipse will automatically import new packages added to the project environment.
3, create a ueditor.jsp page to start importing UEditor rich text editor
Note: You must be the three files when importing UEditor,
1 |
|
导入这3个文件之后在需要调用UEditor的位置加入
1 |
|
最后通过初始化UEditor,让它显示出来
1 |
|
页面全部代码如下:
1 |
|
Results are as follows:
Note: 1, when the contents of the text box with
2, when you need to upload the picture, you need to configure the picture path, or uploaded images in rich text editor is not showing up.
Change the image path> config.json file - in ueditor-> JSP -> lib
3, in the path of the rich text editor to join them ueditor.config.js
this configuration is complete! ! !