README

SMS Counter by Sms77
Installation
For Browsers
<script src="https://unpkg.com/@sms77.io/counter/dist/index.js"></script>For NodeJS
yarn add @sms77.io/counterimport '@sms77.io/counter'
Usage
<textarea data-sms77-sms></textarea>
For advanced usage see the example.
Options
Set the window object before loading the library.
window.SMS77IO_COUNTER_OPTIONS = {
initEvent: string = 'DOMContentLoaded', // the DOM event for init
position: InsertPosition = 'afterend', // where to add the counter span
selector: string = 'textarea[data-sms77-sms]', // the inputs selector
standalone: boolean = false, // stop attaching input listeners
stats: boolean = false, // whether to output stats or not
}