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

Index

Inputs
Accessors

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
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 :
Name Type Optional
value NumberInput No
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 :
Name Type Optional
value BooleanInput No
Returns : void

results matching ""

    No results matching ""