# EuiEditorMaxlengthDirective

**Type:** directive



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.


**Selector:** `[formControlName][euiEditorMaxlength]`

## Inputs
- **euiEditorMaxlength**: `number` - Maximum allowed character count for editor content. Characters are counted after stripping HTML tags or formatting. Required for directive to function.
- **format**: `"html" | "json"` - 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**: `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.
