ueditor

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

License

License

The MIT License (MIT)
GroupId

GroupId

com.github.jackpanz
ArtifactId

ArtifactId

ueditor
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

ueditor
Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/jackpanz/ueditor

Download ueditor

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.jackpanz/ueditor/ -->
<dependency>
    <groupId>com.github.jackpanz</groupId>
    <artifactId>ueditor</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jackpanz/ueditor/
implementation 'com.github.jackpanz:ueditor:1.0.0'
// https://jarcasting.com/artifacts/com.github.jackpanz/ueditor/
implementation ("com.github.jackpanz:ueditor:1.0.0")
'com.github.jackpanz:ueditor:jar:1.0.0'
<dependency org="com.github.jackpanz" name="ueditor" rev="1.0.0">
  <artifact name="ueditor" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jackpanz', module='ueditor', version='1.0.0')
)
libraryDependencies += "com.github.jackpanz" % "ueditor" % "1.0.0"
[com.github.jackpanz/ueditor "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.json : json jar 20180130
commons-io : commons-io jar 2.6

provided (4)

Group / Artifact Type Version
javax.servlet : javax.servlet-api jar 3.1.0
com.aliyun.oss : aliyun-sdk-oss jar 2.2.1
org.springframework : spring-web jar 5.0.0.RELEASE
commons-fileupload : commons-fileupload jar 1.3.3

Project Modules

There are no modules declared in this project.

uediter

  • Support spring mvc upload
  • Support spring boot upload
  • Support local storage
  • Support Alibaba Cloud Storage

Download

Gradle:

dependencies {
  implementation 'com.github.jackpanz:ueditor:1.0.0'
}

Maven:

<dependency>
    <groupId>com.github.jackpanz</groupId>
    <artifactId>ueditor</artifactId>
    <version>1.0.0</version>
</dependency>

Usage

Configure your Controller url

  • /ueditoru/editor.config.js
...
window.UEDITOR_CONFIG = {
    UEDITOR_HOME_URL: URL
, serverUrl:window.location.protocol  + "//" + window.location.host + "/ueditor/controller"
...

Local storage

@ResponseBody
@RequestMapping(value = "/ueditor/aliyun", method = {RequestMethod.POST, RequestMethod.GET})
public String aliyun(HttpServletRequest request) {
    String value = new ActionEnter(request, new LocalSpringFileManager(
            new File("D:/java/nginx-1.15.8/html"),
            "http://localhost/")
    ).exec();
    return value;
}

Alibaba Cloud

@ResponseBody
@RequestMapping(value = "aliyun", method = {RequestMethod.POST, RequestMethod.GET})
public String aliyun(HttpServletRequest request) {

    if ( isLoad++ == 0) {
        OSSConfig.image_access = "http://xxx.aliyuncs.com/";
        OSSConfig.accessKeyId = "accessKeyId";
        OSSConfig.accessKeySecret = "accessKeySecret";
        OSSConfig.endpoint = "endpoint";
        OSSConfig.bucketName = "bucketName";
    }

    String value = new ActionEnter(request, new OSSSpringFileManager()).exec();
    return value;
}

Versions

Version
1.0.0