euvl / v-clipboard

Simple and powerful clipboard plugin for Vue.js 2 and 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prevent copying

ungarson opened this issue · comments

commented

Hi, would be cool if it was be possible to prevent copying.
For example:

<div v-clipboard="handleCopying"></div>
...
handleCopying() {
  if (something) {
    return `copieable value`
  }
  return false; // so it would prevent copying
}

right now when i return false false value is put to the clipboard, and if I don't return anything, undefined is put.

Is it possible to implement it or am I missing something from the current docs?

commented

I'm going to close it, since 0 activity