reactnativecn / react-native-website

React Native 中文网
https://reactnative.cn
MIT License
216 stars 327 forks source link

react native 富文本编辑器如何实现图片上传并展示进度 #702

Closed chris4010 closed 12 months ago

chris4010 commented 1 year ago

请问,react native 富文本编辑器如何实现图片上传并展示进度,具体效果类似 知乎 的文章发布中图片选择的效果。

目前的实现主要是使用https://github.com/wxik/react-native-rich-editor, 选择图片后,使用insertHTML 插入一个占位图,每当获取上传进度时通过commandDOM 修改占位图的上传进度展示,上传完成后,使用commandDOM删除占位图并插入图片。

目前遇到的问题时,这种实现会和编辑器的undo和redo的交互出现问题,会把占位图展示出来。

请问是否有合适的解决方法,或在编辑器中实现图片上传进度的方法。谢谢

大体的代码如下: `

/**

`

github-actions[bot] commented 1 year ago

👋 Hey there, it looks like there has been no activity on this issue in the last 90 days. Has the issue been fixed, or does it still require the community attention? This issue will be closed in the next 7 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 12 months ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.