packages/components/externals/eui-editor/directives/eui-editor-maxlength.directive.ts
Directive for enforcing maximum character length on eui-editor components. Displays remaining character count indicator and prevents exceeding the specified limit. Strips HTML tags when counting characters in HTML format mode. Must be used with formControlName on eui-editor elements. Automatically updates counter as content changes and applies error styling when limit exceeded.
AfterContentInit
OnDestroy
OnChanges
| Selector | [formControlName][euiEditorMaxlength] |
Inputs |
Accessors |
| euiEditorMaxlength |
Type : number
|
|
Maximum allowed character count for editor content. Characters are counted after stripping HTML tags or formatting. Required for directive to function. |
| isShowMaxlength |
Type : boolean
|
|
Shows or hides the remaining character count indicator. When true, displays counter below editor showing characters remaining. Counter turns red when limit is exceeded. |
| euiEditorMaxlength | ||||||
geteuiEditorMaxlength()
|
||||||
|
Maximum allowed character count for editor content. Characters are counted after stripping HTML tags or formatting. Required for directive to function.
Returns :
number
|
||||||
seteuiEditorMaxlength(value: NumberInput)
|
||||||
|
Parameters :
Returns :
void
|
| isShowMaxlength | ||||||
getisShowMaxlength()
|
||||||
|
Shows or hides the remaining character count indicator. When true, displays counter below editor showing characters remaining. Counter turns red when limit is exceeded.
Returns :
boolean
|
||||||
setisShowMaxlength(value: BooleanInput)
|
||||||
|
Parameters :
Returns :
void
|