1.0.0 • Published 3 years ago

contenteditable-max-length v1.0.0

Weekly downloads
7
License
MIT
Repository
github
Last release
3 years ago

contenteditable-max-length

Set the maximum number of characters that can be entered in the contenteditable element

Getting started

npm install contenteditable-max-length --save-dev

Syntax

const unsubscribe = contenteditableMaxLength([options])

Options

element
DOM contenteditable element

maxLength
Number of maximum characters

Return value

The unsubscribe function

Usage example

import contenteditableMaxLength from 'contenteditable-max-length'

const unsubscribe = contenteditableMaxLength({
  element: document.getElementById('contenteditable-element'),
  maxLength: 100
})
1.0.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago