An open API service indexing awesome lists of open source software.

https://github.com/basemax/copyclipboardjs

Tiny Library for copy text in clipboard.
https://github.com/basemax/copyclipboardjs

browser clipboard clipboard-javascript clipboard-javascript-library clipboard-js clipboard-manager clipboardjs copy copy-paste javascript javascript-lib javascript-library js js-library js-libs purejs

Last synced: about 2 months ago
JSON representation

Tiny Library for copy text in clipboard.

Awesome Lists containing this project

README

        

# CopyClipboard
Tiny Library for copy text in clipboard.

![CopyClipboard.min.js File Size](https://img.shields.io/badge/Compressed%20Size-2%20KB-blue.svg) ![CopyClipboard.min.js Validation Code](https://img.shields.io/badge/Validation%20Code-Check-green.svg)

## Features

- Fast
- Compact
- No dependencies
- Event after copy (e.g :`AJAX`,send a GET request)

## Arguments

| Argument Name | Goal |
| ------------- | ------------- |
| data-copy-text | Set Text |
| data-copy-from | Set target, to get the text from they |
| data-copy-after | Execute the code after copying |
| data-copy-link | Send GET Request to a link after copying |

## Samples

To view the full details, run the [Example.html](https://github.com/BaseMax/CopyClipboardJs/blob/master/Example.html) file.

#### `data-copy-text`
```
Click , Copy!
```
#### `data-copy-from`
```
Enter Text :


Click , Copy!
```
#### `data-copy-after`
It will be completed in the future.

#### `onclick`
```
Click , Copy text with onclick
```
```
Click , Copy from #id with onclick
```
```
Click , Copy text
```

# License

CopyClipboard is licensed under the [GNU General Public License](https://github.com/BaseMax/CopyClipboardJs/blob/master/LICENSE).