### File

`packages/components/externals/eui-editor/directives/eui-editor-maxlength.directive.ts`

### Description

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.

### Implements

`AfterContentInit` `OnDestroy` `OnChanges`

### Metadata

Selector | `[formControlName][euiEditorMaxlength]`

### Index

###### Inputs
euiEditorMaxlength format isShowMaxlength
###### Accessors
euiEditorMaxlength isShowMaxlength

### Inputs

euiEditorMaxlength
Type : `number`
Maximum allowed character count for editor content. Characters are counted after stripping HTML tags or formatting. Required for directive to function.

format
Type : `"html" | "json"`
Default value : `'html'`
Content format of the editor being validated. Determines how content is parsed for character counting. 'html' strips HTML tags, 'json' parses Quill Delta format.

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.

### Accessors

euiEditorMaxlength
get `euiEditorMaxlength()`
Maximum allowed character count for editor content. Characters are counted after stripping HTML tags or formatting. Required for directive to function. Returns : `number`
set `euiEditorMaxlength(value: NumberInput)`
Parameters :
Name | Type | Optional
value | `NumberInput` | No
Returns : `void`

isShowMaxlength
get `isShowMaxlength()`
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`
set `isShowMaxlength(value: BooleanInput)`
Parameters :
Name | Type | Optional
value | `BooleanInput` | No
Returns : `void`

# results matching ""

# No results matching ""