Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to handle paste for images in editor #58

Open
morajabi opened this issue Feb 17, 2024 · 3 comments
Open

Ability to handle paste for images in editor #58

morajabi opened this issue Feb 17, 2024 · 3 comments

Comments

@morajabi
Copy link

It would be awesome if we could allow use to paste an image (copied from Photos, Safari, etc) and we'd receive the event in a listener. I would like to initiate an image upload when user pastes an image.
Is there any workaround for this?

@ivailop7
Copy link

ivailop7 commented Feb 17, 2024

There is already a 'PASTE_COMMAND' that gets fired upon the action, so you can define your handling of images (upload to S3, etc in there)

Edit: Realized it's lexical-ios, not sure if it applies here, but since 'PASTE_COMMAND' is part of the Lexical core, I'd assume this still applies, but haven't worked with this one.

@morajabi
Copy link
Author

@ivailop7 Nice, but still I don't get the option to paste when I tap on the lexical editor if I only have image in my pasteboard.

IMG_CCE2BCEF4149-1

@ivailop7
Copy link

I see. Not familiar with the mechanics here. Sorry.

@morajabi morajabi changed the title Ability to registerListener to get pasted image Ability to handle paste for images in editor Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants