# jd-clipboard

> clipboard copy and callback support.

Latest version **1.0.0** (published 2018-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install jd-clipboard
pnpm add jd-clipboard
yarn add jd-clipboard
bun add jd-clipboard
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-09-14 |
| First published | 2018-09-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 65.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | KimYeonho |
| Maintainers | yeonhos2 |
| Keywords | clipboard, jaden, jd, jdclipboard, jd-clipboard, jdClipboard |

## Links

- npm: https://www.npmjs.com/package/jd-clipboard
- Repository: https://github.com/jadenspace/clipboard
- Homepage: https://github.com/jadenspace/clipboard#readme
- Issues: https://github.com/jadenspace/clipboard/issues
- npm.io page: https://npm.io/package/jd-clipboard

## Dependencies (1)

- [docdash](https://npm.io/package/docdash.md) ^0.4.0

## Recent versions

- 1.0.0 (latest) — 2018-09-14

## README

# clipboard.js
- clipboardData, execCommand 메서드를 통한 클립보드 복사 기능 구현.
- 미지원 브라우저에서 prompt 창을 통한 카피텍스트 노출.

## 사용법

### 기본

```javascript
new Clipboard('selector', {
    text: 'message'
});
```

### Options

```javascript
@text // 복사할 키워드    
@promptMsg // prompt 창 안내 메시지 (default: '해당 문구를 복사해주세요.')    
@callback // 콜백 함수 (default: function(){ alert('클립보드에 해당 문구가 복사되었습니다.')} )
```

### Method

```javascript
Clipboard.copy() // 메서드를 통한 복사 실행
Clipboard.initOption(options) // 옵션 변경    
Clipboard.reset() // 클립보드 기능 제거(초기화)
```

## 주의사항
- 일치하는 선택자가 2개 이상일 경우 첫 element 요소에 적용됨.

## 브라우저 호환
### Desktop
| <center>IE</center> |  <center>Chrome</center> |  <center>Firefox</center> | <center>Safari</center>
| ------------ | ------------- | ------------- | -------------
| <center>8+</center> | <center>42+</center> | <center>41+</center> | <center>10+</center>

> ID Selector 사용 시 IE 모든 버전 호환

> jQuery 환경일 시 IE 모든 버전 호환

### Mobile
| <center>Samsung Internet</center> |  <center>Chrome for Android</center> |  <center>Firefox Mobile</center> | <center>Safari Mobile</center>
| ------------- | ------------- | ------------- | -------------
| <center>6.4+</center> | <center>42+</center> | <center>41+</center> | <center>10+</center>


> SamsungInternet : 6.4 미만 버전 호환 체크 필요

---
_Source: https://npm.io/package/jd-clipboard · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
