Skip to content

antpv/contenteditable-max-length

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
})

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors