Comments (10)
import CustomUpload from './xxxx'
const customUpload = new CustomUpload()
customUpload.setGlobalUpload(engine)
from am-editor.
https://editor.aomao.com/config/upload
from am-editor.
这个今天凌晨的时候看了,参考单个插件上传“以 ImageUploader 为例”,其中在“handleUpload”中植入了外部上传组件触发逻辑,但是却没有阻止默认的原有逻辑机制,比如两次弹出文件选择对话框,而且植入的外置组件是异步分块上传的,上传结果不会马上返回。
from am-editor.
from am-editor.
全局的也在文档那个下方------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:37:33 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) https://editor.aomao.com/config/upload 这个今天凌晨的时候看了,参考单个插件上传“以 ImageUploader 为例”,其中在“handleUpload”中植入了外部上传组件触发逻辑,但是却没有阻止默认的原有逻辑机制,比如两次弹出文件选择对话框,而且植入的外置组件是异步分块上传的,上传结果不会马上返回。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
看到这个了https://editor.aomao.com/zh-CN/config/upload#%E5%85%A8%E5%B1%80%E4%B8%8A%E4%BC%A0
但是属实没看懂,重写后咋植入生效,重新创建一个ts文件然后参考植入?
from am-editor.
from am-editor.
如果你有仔细看会发现在 setGlobalUpload 方法里面 有 engine.request.upload = async ... 的覆盖操作------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:43:42 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) 全局的也在文档那个下方------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:37:33 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) https://editor.aomao.com/config/upload 这个今天凌晨的时候看了,参考单个插件上传“以 ImageUploader 为例”,其中在“handleUpload”中植入了外部上传组件触发逻辑,但是却没有阻止默认的原有逻辑机制,比如两次弹出文件选择对话框,而且植入的外置组件是异步分块上传的,上传结果不会马上返回。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 看到这个了https://editor.aomao.com/zh-CN/config/upload#%E5%85%A8%E5%B1%80%E4%B8%8A%E4%BC%A0 但是属实没看懂,重写后咋植入生效,重新创建一个ts文件然后参考植入? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>
这段并未输出console.log('setGlobalUpload', engine)
这个是触发外置上传组件
from am-editor.
from am-editor.
这个只是个自定义方法,你要自己调用------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:53:13 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) 如果你有仔细看会发现在 setGlobalUpload 方法里面 有 engine.request.upload = async ... 的覆盖操作------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:43:42 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) 全局的也在文档那个下方------------------------------------------------------------------ @.> 日 期:2024年03月25日 20:37:33 @.> @.>; @.> 主 题:Re: [red-axe/am-editor] 如何重写编辑器 engine.request.upload 方法 (Issue #375) https://editor.aomao.com/config/upload 这个今天凌晨的时候看了,参考单个插件上传“以 ImageUploader 为例”,其中在“handleUpload”中植入了外部上传组件触发逻辑,但是却没有阻止默认的原有逻辑机制,比如两次弹出文件选择对话框,而且植入的外置组件是异步分块上传的,上传结果不会马上返回。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 看到这个了https://editor.aomao.com/zh-CN/config/upload#%E5%85%A8%E5%B1%80%E4%B8%8A%E4%BC%A0 但是属实没看懂,重写后咋植入生效,重新创建一个ts文件然后参考植入? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> image.png (view on web) 这段并未输出console.log('setGlobalUpload', engine) image.png (view on web) 这个是触发外置上传组件 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
咋调用o(╥﹏╥)o
from am-editor.
import CustomUpload from './xxxx'
const customUpload = new CustomUpload() customUpload.setGlobalUpload(engine)
自定义图片上传组件,实现了自定义图片文件上传。组件级别的,上传每个都需要重写吗?
from am-editor.
Related Issues (20)
- 引用@aomao/plugin-yjs-websocket并new WebsocketProvider后报These dependencies were not found:
- toolbar引用antd4样式文件,能兼容antd5吗?
- 开启协同编辑后图片经常加载失败
- 能不能为View视图增加一个类似Engine中setHtml渲染方法 HOT 2
- 可以出一个vue2的多人协作demo吗,完全不知道怎么用。 HOT 4
- Toolbar collapse item custome failured, How can define success? HOT 16
- 通过ot 的方式切换到yjs,数据如何同步过来呢? HOT 12
- 通过ot 的方式切换到yjs,数据如何同步过来呢?
- 如何对加入文档的协作者进行限制? HOT 2
- 批量上传会丢失数据 request.upload方法有错误 HOT 1
- Ctrl+Z 会丢失内容
- 插件样式引用报错
- ant-design-vue Tooltip异常提示 HOT 1
- embed cannot preview in view
- 样式解耦element-plus
- 完全自定义上传功能定义
- 如何完全外部自定义upload相关业务
- 如何添加一个placeholder属性
- 官方文档504啦,无法查看文档,期望解决 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from am-editor.