@@ -109,32 +109,36 @@ Fires when counter is under min limit.
109
109
## Options
110
110
111
111
``` javascript
112
- type : " character" , // "character" or "word"
113
- min : 0 , // minimum number of characters/words
114
- max : 200 , // maximum number of characters/words, -1 for unlimited, 'auto' to use maxlength attribute
115
- countContainerElement : " div" , // HTML element to wrap the text count in
116
- countContainerClass : " text-count-wrapper" , // class applied to the countContainerElement
117
- textCountClass : " text-count" , // class applied to the counter length
118
- inputErrorClass : " error" , // error class appended to the input element if error occurs
119
- counterErrorClass : " error" , // error class appended to the countContainerElement if error occurs
120
- counterText : " Total Count: %d" , // counter text, %d replaced with count value
121
- errorTextElement : " div" , // error text element
122
- minimumErrorText : " Minimum not met" , // error message for minimum not met,
123
- maximumErrorText : " Maximum exceeded" , // error message for maximum range exceeded,
124
- displayErrorText : true , // display error text messages for minimum/maximum values
125
- stopInputAtMaximum : true , // stop further text input if maximum reached
126
- countSpaces : false , // count spaces as character (only for "character" type)
127
- countDown : false , // if the counter should deduct from maximum characters/words rather than counting up
128
- countDownText : " Remaining: %d" , // count down text, %d replaced with remaining value
129
- countExtendedCharacters : false , // count extended UTF-8 characters as 2 bytes (such as Chinese characters)
130
- twoCharCarriageReturn : false , // count carriage returns/newlines as 2 characters
112
+ type : " character" , // "character" or "word"
113
+ min : 0 , // minimum number of characters/words
114
+ max : 200 , // maximum number of characters/words, -1 for unlimited, 'auto' to use maxlength attribute
115
+ countContainerElement : " div" , // HTML element to wrap the text count in
116
+ countContainerClass : " text-count-wrapper" , // class applied to the countContainerElement
117
+ textCountMessageClass : " text-count-message" , // class applied to the counter message
118
+ textCountClass : " text-count" , // class applied to the counter length (the count number)
119
+ inputErrorClass : " error" , // error class appended to the input element if error occurs
120
+ counterErrorClass : " error" , // error class appended to the countContainerElement if error occurs
121
+ counterText : " Total Count: %d" , // counter text
122
+ errorTextElement : " div" , // error text element
123
+ minimumErrorText : " Minimum not met" , // error message for minimum not met,
124
+ maximumErrorText : " Maximum exceeded" , // error message for maximum range exceeded,
125
+ displayErrorText : true , // display error text messages for minimum/maximum values
126
+ stopInputAtMaximum : true , // stop further text input if maximum reached
127
+ countSpaces : false , // count spaces as character (only for "character" type)
128
+ countDown : false , // if the counter should deduct from maximum characters/words rather than counting up
129
+ countDownText : " Remaining: %d" , // count down text
130
+ countExtendedCharacters : false , // count extended UTF-8 characters as 2 bytes (such as Chinese characters)
131
+ twoCharCarriageReturn : false , // count carriage returns/newlines as 2 characters
132
+ countOverflow : false , // display text overflow element
133
+ countOverflowText : " Maximum %type exceeded by %d" , // count overflow text
134
+ countOverflowContainerClass : " text-count-overflow-wrapper" , // class applied to the count overflow wrapper
131
135
132
136
// Callback API
133
- maxunder : function (el ){}, // Callback: function(element) - Fires when counter is under max limit
134
- minunder : function (el ){}, // Callback: function(element) - Fires when counter is under min limit
135
- maxcount : function (el ){}, // Callback: function(element) - Fires when the counter hits the maximum word/character count
136
- mincount : function (el ){}, // Callback: function(element) - Fires when the counter hits the minimum word/character count
137
- init : function (el ){} // Callback: function(element) - Fires after the counter is initially setup
137
+ maxunder : function (el ){}, // Callback: function(element) - Fires when counter under max limit
138
+ minunder : function (el ){}, // Callback: function(element) - Fires when counter under min limit
139
+ maxcount : function (el ){}, // Callback: function(element) - Fires when the counter hits the maximum word/character count
140
+ mincount : function (el ){}, // Callback: function(element) - Fires when the counter hits the minimum word/character count
141
+ init : function (el ){} // Callback: function(element) - Fires after the counter is initially setup
138
142
```
139
143
140
144
## Development
0 commit comments