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

Add copy to clipboard button #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

korun-h4
Copy link

Added a copy to clipboard button and select the token on page load.

Changed the <p> tag to <textarea> where the token is rendered for easier content selection and copy. We could create a temporary Textarea inside the copy function to prevent changing the HTML but then the token content would be more difficult to select on page load.

Added copyToClipboard function in Vue component to handle coping and called it on component mount to select the text (it doesn't copy since document.execCommand can only be invoked on verified user input eg. click).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant