Skip to content

TouchSek/nuxt-clipboard2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nuxt-clipboard2

A "copy to clipboard" module for Nuxt.js using vue-clipboard2

Setup

  • Add nuxt-clipboard2 dependency using yarn or npm to your project
  • Add nuxt-clipboard2 to modules section of nuxt.config.js
{
  modules: [
   'nuxt-clipboard2',
  ]
}

Usage

You can use $copyText in almost any context using app.$copyText or this.$copyText (Including store actions).

See vue-clipboard2 official docs for more usage information.

export default {
  methods: {
    async copySomething(text) {
      try {
        await this.$copyText(text);
      } catch (e) {
        console.error(e);
      }
    },
  },
};

License

MIT License

Copyright (c) webcore-it

About

Nuxt module for vue-clipboard2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%