Giter VIP home page Giter VIP logo

ueditor4springboot's Introduction

ueditor4springboot

SpringBoot整合ueditor

项目简介

UEditor是由百度推出的一款开源富文本编辑器,但是也有2年多没有更新了,目前Java最新版为2016-02-25发布的 v1.4.3.3,由于年代较久远,在SpringBoot项目中整合也遇到一些坑,特建此项目记录SpringBoot整合UEditor步聚。
UEditor [1.4.3.3 Jsp 版本] 下载地址:https://ueditor.baidu.com/website/download.html

准备工作

1、下载UEditor JSP版本后解压,将所有文件放入项目资源目录中,如我的项目结构为:
resources/
-  mapper/
-  static/
    -  js/
    -  ...
    -  ueditor/
        -  dialogs/
        -  lang/
        -  themes/
        -  ...
        -  ueditor.config.js
        -  ...


2、当前GitHub项目中的 :
controller/ :为控制器,重写UEditor上传方法
util/ :为工具类,上传操作封装
resources/application.properties :为项目配置参数
请将这3个文件合理放入你的项目中,确保能正常运行,访问 /admin/ueditor/controller?action=config 看是否正常输出json。


3、在第1步基础上,修改你的ueditor配置文件(ueditor.config.js),主要修改:serverUrl 配置项即可,此配置项的值请填入第2步中控制器的访问路径,如我的配置:
, serverUrl: "/admin/ueditor/controller"


4、网上有不少教程会让你把 ueditor/jsp/lib/ueditor-1.1.2.jar 导入到你的项目中,因为在第1步控制器中已经重写了上传方法,所以我们不必导入这些jar包。为安全起见,我们可以把 ueditor/jsp/ 整个文件夹删除掉。


注意事项

上述第3步操作中的配置值一定要与第1步操作中的控制器访问路径一致!!!

ueditor4springboot's People

Contributors

ah-guobing avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.