react-native-rich-editor
react-native-rich-editor copied to clipboard
Inserting images using file:// on iOS
I'm using the insertImage feature in the editor. If I use the base64 data in the response object from RN Image Picker, the selected image shows up but if I use the uri with file:// it doesn't work, whether is the original uri or the uri after copying the image to an app directory, such as Documents or tmp.
This is not ideal because I need to save the resulting html string in to a database and I don't want to clutter the db with base64 strings. Am I missing something or is "file://" not supported in your editor? It would be great if it can work when using img tag sources like <img src="file:///Users/Library/.....jpg">
. I read this issue, but it seems that the allowFileAccess parameter in Webview only works on Android, not iOS.
Android path is file://..... It seems that iOS does not need to bring file://
Android path is file://..... It seems that iOS does not need to bring file://
Thanks, I tried that but it doesn't work. It seems that in iOS your editor only displays web hosted and base64 images. I have tried a bunch of different things and it doesn't seem to be able to access images locally in Documents, tmp, or the MainBundle paths. Is this the intended behavior? I wonder, where is src in <img src="/path/to/image/...">
pointing to? The app root or somewhere else?