SMS Counter by seven
Counts the SMS character usage for a textarea or text input.
Installation
For Browsers
<script src='https://unpkg.com/@seven.io/counter/dist/index.js'></script>
For NodeJS
Yarn yarn add @seven.io/counter
NPM npm install @seven.io/counter
import '@seven.io/counter'
Usage
<textarea data-seven-sms></textarea>
<input data-seven-sms/>
For advanced usage see the examples.
Options
Set the window object before loading the library.
window.SEVEN_COUNTER_OPTIONS = {
initEvent: string = 'DOMContentLoaded',
position: InsertPosition = 'afterend',
selector: string = '*[data-seven-sms]',
standalone: boolean = false,
stats: boolean = false,
}
Support
Need help? Feel free to contact us.