Ueditor Baidu Editor configuration How to upload pictures

Source: Internet
Author: User


1. Preparatory work

http://ueditor.baidu.com/website/

Download the Udditor version you need

2. Extract it

3. Guide package extracted from the file JSP under the Lib import into the project web-inif under the Lib

Note: If the import package is still reported inser ... This error, put the package into the server Lib

4. Modify the configuration file

Ueditor.config.js

Window. Ueditor_home_url = "/default/eos/";

Cancel from comment, default is Project name EOS is the file directory where the udditor is stored

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/8D/E1/wKioL1iuMaTzjEgNAABOhz56gm4469.png-wh_500x0-wm_ 3-wmp_4-s_676431408.png "title=" qq picture 20170223084905.png "alt=" Wkiol1iumatzjegnaabohz56gm4469.png-wh_50 "/>



5. Modify the JSP under Config.json

"Imageurlprefix": "Http://localhost:8989/default",

650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8D/E3/wKiom1iuMhPiZEcwAAB-pH-_Bfs145.png-wh_500x0-wm_ 3-wmp_4-s_3531267880.png "title=" 111.png "alt=" Wkiom1iumhpizecwaab-ph-_bfs145.png-wh_50 "/>

Note: If you want to change the path of uploading pictures

Modify the following

650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/8D/E1/wKioL1iuMl3zidIlAADMWTc2jVA558.png-wh_500x0-wm_ 3-wmp_4-s_952893589.png "title=" 2222.png "alt=" Wkiol1iuml3zidilaadmwtc2jva558.png-wh_50 "/>

6. Test page

<%@ page language= "java" import= "java.util.*" pageencoding= "Utf-8"%>

<%

String path = Request.getcontextpath ();

String basepath = request.getscheme () + "://" +request.getservername () + ":" +request.getserverport () +path+ "/";

%>


<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >

<script type= "Text/javascript" charset= "Utf-8" src= "Ueditor.config.js" ></script>

<script type= "Text/javascript" charset= "Utf-8" src= "Ueditor.all.min.js" > </script>

<link rel= "stylesheet" href= "Themes/default/css/ueditor.css" >

<body>

<div align= "center" >

<textarea id= "Newseditor" name= "Content" > Baidu editor </textarea>

<br/>

<input type= "Submit" value= "Submission" >

<script type= "Text/javascript" >

var editor = new Baidu.editor.ui.Editor ();

Editor.render ("Newseditor");

</script>

</div>


</body>

Note: If the process reported a resource error, the jar package was imported incorrectly

If the path is not uniform, the path configured above is wrong



Ueditor Baidu Editor configuration How to upload pictures

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.