clipboard icon indicating copy to clipboard operation
clipboard copied to clipboard

feat: getImage iOS

Open s77rt opened this issue 1 year ago • 3 comments

Overview

Added getImage support for iOS.

Test Plan

  1. Copy JPEG image
  2. Paste the image and verify it's pasted as jpeg
  3. Copy PNG image
  4. Paste the image and verify it's pasted as png
  5. Copy GIF image
  6. Paste the image and verify it's pasted as gif

https://github.com/user-attachments/assets/2231b890-8698-49bf-be40-461d79607fc7

https://github.com/user-attachments/assets/699eea6f-3b97-4df8-be25-ab54d0821d6a

s77rt avatar Jul 22 '24 11:07 s77rt

In our use case, we need to use getImage because using getImagePNG for JPEG is slower

Copying as JPEG Copying as PNG

s77rt avatar Jul 22 '24 11:07 s77rt

Putting this on draft while I add support for more image types including GIF

s77rt avatar Jul 23 '24 18:07 s77rt

Ready for review

s77rt avatar Jul 23 '24 19:07 s77rt

Amazing! How did you enable text input to capture the Paste event?

durdevic avatar Oct 30 '24 15:10 durdevic

@durdevic There is a proposal on adding onPaste to TextInput but not approved yet. However you can patch RN and apply changes from https://github.com/facebook/react-native/pull/45425

s77rt avatar Oct 30 '24 15:10 s77rt

@Naturalclar Would you be able to review this one?

s77rt avatar Oct 30 '24 15:10 s77rt

Perfect, thanks for that one! @s77rt

Let's hope both got merged in the next release 🤞

durdevic avatar Oct 30 '24 15:10 durdevic