react-native-cn-quill icon indicating copy to clipboard operation
react-native-cn-quill copied to clipboard

How to get Editor to show an image from the phone's photo gallery (temporarily before upload)

Open bumpingChris opened this issue 3 years ago • 1 comments

I would like to enable a user to select an image from the phone's photo gallery and see it on the editor BEFORE uploading to an online store.

The selected image would have a local path like

localPathImage = '/Users/XXXXXX/Library/Developer/CoreSimulator/Devices/6CFB4732-DEB7-41C4-B285-D83DCDCD&&/data/Containers/Data/Application/CC34234CD-34A4-42BD-86F0-2C197F0BBEDED4/tmp/react-native-image-crop-picker/BEFEBD43-C518-4077-9D94-FEBFB2D3A7CB.jpg'

I would like to change this path to a http:// or https:// url only after the user decides to post the content.

However performing: this._editor.current?.insertEmbed(range, 'image', localPathImage); does not render the image on the editor.

Any suggestions on how to enable this?

bumpingChris avatar Jul 28 '22 07:07 bumpingChris

Hey did you have find any solution to this i am facing the same issue

pksingh21 avatar Mar 20 '24 09:03 pksingh21