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

Transcription view contains a button to copy text into user's clipboard #11

Closed
dcarpenter31 opened this issue Sep 8, 2021 · 5 comments · Fixed by #62
Closed

Transcription view contains a button to copy text into user's clipboard #11

dcarpenter31 opened this issue Sep 8, 2021 · 5 comments · Fixed by #62
Assignees
Labels
difficulty/easy enhancement New feature or request

Comments

@dcarpenter31
Copy link
Contributor

The transcription view will have a button on the bottom to copy the text that is currently in the text box into the user's clipboard, for the user's convenience.

@dcarpenter31 dcarpenter31 added difficulty/easy enhancement New feature or request labels Sep 8, 2021
@WBot3000
Copy link
Contributor

So I was looking into this issue, and turns out React Native's clipboard API is depreciated.
https://reactnative.dev/docs/clipboard

There are three external packages in the React Native Directory for this kind of stuff. Should we use the first one, since it seems to support the most devices and has Typescript types?
https://github.com/react-native-clipboard/clipboard

@WBot3000 WBot3000 self-assigned this Oct 10, 2021
@dcarpenter31
Copy link
Contributor Author

Yeah, the one you linked looks like good choice

@WBot3000
Copy link
Contributor

WBot3000 commented Oct 10, 2021

So I decided to try out the package, but I encountered this problem
react-native-clipboard/clipboard#80

Upon further review, it appears this package doesn't work properly with Expo. I got the copying working with the deprecated version that comes with React Native though. Might look through some more stuff tomorrow.

@dcarpenter31
Copy link
Contributor Author

dcarpenter31 commented Oct 10, 2021

Looks like expo has their own package that we should use: https://docs.expo.dev/versions/latest/sdk/clipboard/
That's probably why the package you tried did not work.

@WBot3000
Copy link
Contributor

Good find. Will try this out. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/easy enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants