百度富文本框编辑器不能上传图片

在富文本框编辑器中上传图片总是提示flashplay有问题,不能上传,进行以后的操作:

修改

Internet选项--隐私--去掉Inprivate下面的勾选项

就可以上传图片了


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是使用 Spring Boot 集成百度富文本编辑器的步骤: 1. 在 pom.xml 中添加以下依赖: ```xml <dependency> <groupId>com.baidu</groupId> <artifactId>ueditor</artifactId> <version>1.1.2</version> </dependency> ``` 2. 将 ueditor.config.js 和 ueditor.all.min.js 等文件放到 src/main/resources/static/ueditor/ 目录下。 3. 在 application.properties 中添加以下配置: ```properties # 配置 UEditor 插件的路径 ueditor.config=/ueditor/ueditor.config.js ueditor.upload.path=/ueditor/upload/ ``` 4. 创建一个 UEditorController,用于处理 UEditor 的请求: ```java @Controller public class UEditorController { @GetMapping("/ueditor") public String ueditor() { return "ueditor"; } @PostMapping("/ueditor") @ResponseBody public String upload(HttpServletRequest request) throws Exception { request.setCharacterEncoding("utf-8"); String rootPath = request.getServletContext().getRealPath("/"); return new ActionEnter(request, rootPath).exec(); } } ``` 5. 编写一个 ueditor.html 文件,用于展示 UEditor 编辑器: ```html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>UEditor Demo</title> <!-- 配置 UEditor 插件的路径 --> <script type="text/javascript" src="/ueditor/ueditor.config.js"></script> <script type="text/javascript" src="/ueditor/ueditor.all.min.js"></script> </head> <body> <script id="editor" type="text/plain" style="width:100%;height:500px;"></script> <script type="text/javascript"> var editor = UE.getEditor('editor'); </script> </body> </html> ``` 6. 启动应用程序,访问 http://localhost:8080/ueditor 即可看到 UEditor 编辑器页面。 7. 在 UEditor 编辑器中输入内容并保存,上传的图片和文件会保存在项目的 ueditor/upload/ 目录下。 以上就是使用 Spring Boot 集成百度富文本编辑器的步骤。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值