Butterfly icon indicating copy to clipboard operation
Butterfly copied to clipboard

[Feature request]: allow pasting images

Open MrGumpIT opened this issue 1 year ago • 1 comments
trafficstars

Is your feature request related to a problem? Please describe

No response

Describe your feature request!

currently if you take a screenshot it is not possible to paste it into the drawing area on windows

Additional context

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

MrGumpIT avatar Feb 12 '24 21:02 MrGumpIT

good idea but then we need access to the native clipboard

CodeDoctorDE avatar Feb 13 '24 07:02 CodeDoctorDE

I agree that this is a necessary feature.

MisterE123 avatar Mar 23 '24 00:03 MisterE123

i created an issue on my library that i developed for clipboard: https://github.com/LinwoodDev/dart_pkgs/issues/5

CodeDoctorDE avatar Mar 28 '24 18:03 CodeDoctorDE

or wait, super_clipboard is exactly what i need https://pub.dev/packages/super_clipboard

CodeDoctorDE avatar Mar 28 '24 18:03 CodeDoctorDE

Okay I started implementing it in #651

  1. The custom clipboard is not available on android < 6. I will still support android 5 and 5.1 and use the current implementation as fallback.
  2. All app specific copy/paste will also be handled by the native clipboard manager and override the current copied data inside the clipboard.
  3. I didn't test it, it can work fine now or doesn't work. You can test it under https://butterfly-git-feature-native-clipboard-linwood.vercel.app/

CodeDoctorDE avatar Mar 28 '24 19:03 CodeDoctorDE

mhh not working

MrGumpIT avatar Mar 30 '24 14:03 MrGumpIT

Yeah not working on Windows.

MisterE123 avatar Mar 30 '24 19:03 MisterE123

Hello, Thanks for testing it. I fixed it in the next commit. I tested it myself on windows 11 with copy/pasting an element and pasting a native image from the clipboard. It would be nice if you could test it too so I can put it in the next beta.

Here are the links:

  • Web: https://butterfly-git-feature-native-clipboard-linwood.vercel.app/
  • Native: https://github.com/LinwoodDev/Butterfly/actions/runs/8579883201?pr=651 (once it built, the buttons are at the bottom of the page, you need to be authenticated in github otherwise the buttons doesn't work)

CodeDoctorDE avatar Apr 06 '24 08:04 CodeDoctorDE

Hmm okay, I tested it a bit and native web clipboard isn't possible right now... But on native platforms on mobile and desktop it should work

CodeDoctorDE avatar Apr 06 '24 20:04 CodeDoctorDE

Added in 2.1.0-beta.5

CodeDoctorDE avatar Apr 07 '24 17:04 CodeDoctorDE