# maxlength-contenteditable

> Simple maxlength plugin validator for contenteditable html , this plugin do not allow you to put more than the specified max length allowed, paste from clipboard is also checked

Latest version **1.0.1** (published 2018-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install maxlength-contenteditable
pnpm add maxlength-contenteditable
yarn add maxlength-contenteditable
bun add maxlength-contenteditable
```

## 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.1 |
| Published | 2018-09-03 |
| First published | 2017-12-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.8.0 |
| Dependencies | 1 |
| Unpacked size | 35.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Stephen31 |
| Maintainers | stephen31 |
| Keywords | contenteditable, maxlength, plugin, input, textarea, javascript, HTMLElement |

## Links

- npm: https://www.npmjs.com/package/maxlength-contenteditable
- Repository: https://github.com/stephen31/maxlength-contenteditable
- Homepage: https://github.com/stephen31/maxlength-contenteditable#readme
- Issues: https://github.com/stephen31/maxlength-contenteditable/issues
- npm.io page: https://npm.io/package/maxlength-contenteditable

## Dependencies (1)

- [core-js](https://npm.io/package/core-js.md) ^2.5.6

## 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

- 1.0.1 (latest) — 2018-09-03
- 1.0.0 — 2017-12-23

## README

# Max length plugin for contenteditable HTML attribute

> Simple maxlength plugin validator for contenteditable html attribute, this plugin do not allow you to put more than the specified max length, paste from clipboard is also checked.

### Demo Link

[Demo here](https://stephen31.github.io/maxlength-contenteditable/public/)

## Installation

#### npm

```bash
$ npm install maxlength-contenteditable --save
```
#### yarn
```bash
$ yarn add maxlength-contenteditable --save
```
### unpkg CDN
 You can also skip yarn/npm install by using repos on the cdn 

```html
<script src="https://unpkg.com/maxlength-contenteditable@1.0.1/dist/maxlength-contenteditable.js"></script>
```
## initialize

***you have 3 ways to do it*** :
### CommonJS
```javascript 
var maxlengthContentEditableLib = require('maxlength-contenteditable');
```
### ES6 import
```javascript via 
import {maxlengthContentEditable} from 'maxlength-contenteditable';
```
### Global variable (only if you added the script via CDN in your index.html file)
```javascript
maxlengthContentEditableModule.maxlengthContentEditable();
```

 ### Example of use
```html
<div contenteditable="true" data-max-length="10"></div>
```
### Compatibility

 IE 9+ , Chrome , Firefox , Opera

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