You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,8 @@ Fires when counter is under min limit.
111
111
```javascript
112
112
type :"character", // "character" or "word"
113
113
min :0, // minimum number of characters/words
114
-
max :200, // maximum number of characters/words, -1 for unlimited, 'auto' to use maxlength attribute
114
+
max :200, // maximum number of characters/words, -1 for unlimited, 'auto' to use maxlength attribute, , 'autocustom' to use a custom attribute for the length (must set "autoCustomAttr")
115
+
autoCustomAttr :"counterlimit", // custom attribute name with the counter limit if the max is 'autocustom'
115
116
countContainerElement :"div", // HTML element to wrap the text count in
116
117
countContainerClass :"text-count-wrapper", // class applied to the countContainerElement
117
118
textCountMessageClass :"text-count-message", // class applied to the counter message
-[juliovedovatto](https://github.com/juliovedovatto) / [alvaro-canepa](https://github.com/alvaro-canepa) - multiple classes support for counter container
-[jmichalicek](https://github.com/jmichalicek) - count carriage returns/newlines as 2 characters
166
-
-[diptopol](https://github.com/diptopol) - `stopInputAtMaximum` with `twoCharCarriageReturn` count fix, trimmed newline calculation fix, maximum text reached condition fix, text count overflow notification
169
+
-[diptopol](https://github.com/diptopol) - `stopInputAtMaximum` with `twoCharCarriageReturn` count fix, trimmed newline calculation fix, maximum text reached condition fix, text count overflow notification
170
+
-[trevorloflin](https://github.com/trevorloflin) - `minDisplayCutoff` and `maxDisplayCutoff` options
171
+
-[t3mujin](https://github.com/t3mujin) - autocustom support (maxlength workaround), text fixes
'max' : 200,// maximum number of characters/words, -1 for unlimited, 'auto' to use maxlength attribute
318
+
'max' : 200,// maximum number of characters/words, -1 for unlimited, 'auto' to use maxlength attribute, 'autocustom' to use a custom attribute for the length (must set "autoCustomAttr")
319
+
'autoCustomAttr' : "counterlimit",// custom attribute name with the counter limit if the max is 'autocustom'
298
320
'countContainerElement' : "div",// HTML element to wrap the text count in
299
321
'countContainerClass' : "text-count-wrapper",// class applied to the countContainerElement
300
322
'textCountMessageClass' : "text-count-message",// class applied to the counter message
@@ -315,6 +337,8 @@
315
337
'countOverflow' : false,// display text overflow element
316
338
'countOverflowText' : "Maximum %type exceeded by %d",// count overflow text
317
339
'countOverflowContainerClass' : "text-count-overflow-wrapper",// class applied to the count overflow wrapper
340
+
'minDisplayCutoff' : -1,// maximum number of characters/words above the minimum to display a count
341
+
'maxDisplayCutoff' : -1,// maximum number of characters/words below the maximum to display a count
318
342
319
343
// Callback API
320
344
'maxunder' : function(el){},// Callback: function(element) - Fires when counter under max limit
0 commit comments