# clipboar

> Simple library for handling pasting and dropping into webpage.

Latest version **0.1.2** (published 2019-10-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install clipboar
pnpm add clipboar
yarn add clipboar
bun add clipboar
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2019-10-04 |
| First published | 2019-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 213.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | CKSource |
| Maintainers | ckeditor, comandeer |
| Keywords | clipboard, wysiwyg, rich text, html, contentEditable, editing |

## Links

- npm: https://www.npmjs.com/package/clipboar
- Repository: https://github.com/ckeditor/labs
- Homepage: https://github.com/ckeditor/labs/tree/master/clipboar#readme
- Issues: https://github.com/ckeditor/labs/issues
- npm.io page: https://npm.io/package/clipboar

## Dependencies (1)

- [enumify](https://npm.io/package/enumify.md) ^1.0.4

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.1.2 (latest) — 2019-10-04
- 0.1.1 — 2019-10-02
- 0.1.0 — 2019-10-02

## README

# clipboar

[![npm version](https://badge.fury.io/js/clipboar.svg)](https://www.npmjs.com/package/clipboar)

<img src="https://raw.githubusercontent.com/ckeditor/labs/f50c8addbe0383718ebe9f6db63de5a149347014/clipboar/boar-graphics.png" alt="">

A simple library for handling pasting and dropping content into a web page.

## Usage

```js
import { Clipboard, HandlerType } from 'clipboar';

const clipboard = new Clipboard();

// Add some handlers.
clipboard.addHandler( {
	type: HandlerType.PASTE,
	order: 5,
	handle( clipboardData, next ) {
		doSomething( clipboardData );

		next();
	}
} );

// Add some zones.
clipboard.addZone( document.querySelector( '#pasteArea', HandlerType.PASTE ) );
```

## Contributing

After cloning this repository, install necessary dependencies:

```bash
npm install
```

### Executing tests

```bash
npm run test
```

If you are going to change the source files (ones located in the `src/` directory), remember about rebuilding the package. You can use `npm run develop` in order to do it automatically.

### Building the package

Build a minified version of the package that is ready to publish:

```bash
npm run build
```

## License

Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.

Licensed under the terms of [MIT license](https://opensource.org/licenses/MIT).

For full details about the license, please check the `LICENSE.md` file.

The boar 🐗 used in the project illustration is designed by xylia from [Pngtree.com](https://pngtree.com/).

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