nuxt-clipboard | A copy to clipboard module for Nuxt.js
kandi X-RAY | nuxt-clipboard Summary
kandi X-RAY | nuxt-clipboard Summary
A "copy to clipboard" module for Nuxt.js using vue-clipboard2.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nuxt-clipboard
nuxt-clipboard Key Features
nuxt-clipboard Examples and Code Snippets
Community Discussions
Trending Discussions on nuxt-clipboard
QUESTION
I created a Nuxt webpage with Vuetify.js that generates an Email signature from a form to fill in. The render of the signature is displayed in a v-card
element. I have added a v-btn
to automatically copy the signature into the clipboard of the user, but I have some issues with it...
I tried to use nuxt-clipboard2
from npm to help me doing this but nothing works...
Is anyone knows how to use this package correctly or have an alternative to copy content into the clipboard with Nuxt.js?
Thanks in advance :)
EDIT
Here's my code:
...ANSWER
Answered 2019-Aug-27 at 14:54Vue ref is not correctly used. Take a look at the doc.
Try to replace by this:
await this.$copyText(this.$refs.foo)
But are-you sure ref
on the component signTemplate
contains text you want to copy? Why not using v-model
?
Edit:
If you want to copy the html content of your child component signTemplate
, you can use await this.$copyText(this.$refs.foo.$el.innerHTML)
. If you want only text, use innerText
. This is vanilla javascript...
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nuxt-clipboard
Add nuxt-clipboard to modules section of nuxt.config.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page