Vizel API / core/src / VizelCharacterCountOptions
Interface: VizelCharacterCountOptions
Defined in: packages/core/src/extensions/character-count.ts:4
Properties
limit?
ts
optional limit?: number;Defined in: packages/core/src/extensions/character-count.ts:10
The maximum number of characters allowed. Omit (or pass 0) to leave the count unlimited.
Default
ts
undefinedmode?
ts
optional mode?: "textSize" | "nodeSize";Defined in: packages/core/src/extensions/character-count.ts:17
The counting mode.
- 'textSize': Count characters in the text content only
- 'nodeSize': Count all nodes including formatting
Default
ts
'textSize'wordCounter?
ts
optional wordCounter?: (text) => number;Defined in: packages/core/src/extensions/character-count.ts:22
Custom function to count words. By default, words are counted by splitting on whitespace.
Parameters
| Parameter | Type |
|---|---|
text | string |
Returns
number