clipboard-copy-element - Vaadin Add-on Directory
Copy element text content or input values to the clipboard.# <clipboard-copy> element
Copy element text content or input values to the clipboard.
## Installation
```
$ npm install --save clipboard-copy-element
```
## Usage
```js
import 'clipboard-copy-element'
```
```html
Copy path
Copy
```
### Element content
```html
Copy
Copy
```
### Hyperlink href
```html
Copy full URL
Link text will not be copied
```
## Events
After copying to the clipboard, a `clipboard-copy` event is dispatched from
the `` element:
```js
document.addEventListener('clipboard-copy', function(event) {
const button = event.target
button.classList.add('highlight')
})
```
## Browser support
Browsers without native [custom element support][support] require a [polyfill][].
- Chrome
- Firefox
- Safari
- Microsoft Edge
[support]: https://caniuse.com/#feat=custom-elementsv1
[polyfill]: https://github.com/webcomponents/custom-elements
## Development
```
npm install
npm test
```
## License
Distributed under the MIT license. See LICENSE for details.
View on NPMsrc/index.js
```
## Data sources
### Attribute
```html
src/index.js
```
### Form input
```html
View on GitHub
clipboard-copy-element version 0.1.0
### Dependencies
clipboard-copy-element version 0.2.0
### Dependencies
clipboard-copy-element version 0.3.0
### Dependencies
clipboard-copy-element version 0.3.1
### Dependencies
clipboard-copy-element version 0.4.0
### Dependencies
clipboard-copy-element version 0.5.0
### Dependencies
clipboard-copy-element version 0.6.0
### Dependencies
clipboard-copy-element version 0.7.0
### Dependencies
clipboard-copy-element version 1.0.0
### Dependencies