Skip to main content

@lexical/react/LexicalContentEditable

Type Aliases​

ContentEditableElementProps​

ContentEditableElementProps = object & Omit<React.AllHTMLAttributes<HTMLDivElement>, "placeholder">

Defined in: packages/lexical-react/src/shared/LexicalContentEditableElement.tsx:18

Type Declaration​

ariaActiveDescendant?​

optional ariaActiveDescendant?: React.AriaAttributes["aria-activedescendant"]

ariaAutoComplete?​

optional ariaAutoComplete?: React.AriaAttributes["aria-autocomplete"]

ariaControls?​

optional ariaControls?: React.AriaAttributes["aria-controls"]

ariaDescribedBy?​

optional ariaDescribedBy?: React.AriaAttributes["aria-describedby"]

ariaErrorMessage?​

optional ariaErrorMessage?: React.AriaAttributes["aria-errormessage"]

ariaExpanded?​

optional ariaExpanded?: React.AriaAttributes["aria-expanded"]

ariaInvalid?​

optional ariaInvalid?: React.AriaAttributes["aria-invalid"]

ariaLabel?​

optional ariaLabel?: React.AriaAttributes["aria-label"]

ariaLabelledBy?​

optional ariaLabelledBy?: React.AriaAttributes["aria-labelledby"]

ariaMultiline?​

optional ariaMultiline?: React.AriaAttributes["aria-multiline"]

ariaOwns?​

optional ariaOwns?: React.AriaAttributes["aria-owns"]

ariaRequired?​

optional ariaRequired?: React.AriaAttributes["aria-required"]

autoCapitalize?​

optional autoCapitalize?: HTMLDivElement["autocapitalize"]

data-testid?​

optional data-testid?: string | null

editor​

editor: LexicalEditor


ContentEditableProps​

ContentEditableProps = Omit<ContentEditableElementProps, "editor"> & { aria-placeholder?: void; placeholder?: null; } | { aria-placeholder: string; placeholder: ((isEditable) => null | JSX.Element) | JSX.Element; }

Defined in: packages/lexical-react/src/LexicalContentEditable.tsx:23


Props​

Props = ContentEditableProps

Defined in: packages/lexical-react/src/LexicalContentEditable.tsx:44

Deprecated​

This type has been renamed to ContentEditableProps to provide a clearer and more descriptive name. For backward compatibility, this type is still exported as Props, but it is recommended to migrate to using ContentEditableProps instead.

This alias is maintained for compatibility purposes but may be removed in future versions. Please update your codebase to use ContentEditableProps to ensure long-term maintainability.

Variables​

ContentEditable​

const ContentEditable: ForwardRefExoticComponent<ContentEditableProps & RefAttributes<HTMLDivElement>>

Defined in: packages/lexical-react/src/LexicalContentEditable.tsx:46


ContentEditableElement​

const ContentEditableElement: ForwardRefExoticComponent<object & Omit<AllHTMLAttributes<HTMLDivElement>, "placeholder"> & RefAttributes<HTMLDivElement>>

Defined in: packages/lexical-react/src/shared/LexicalContentEditableElement.tsx:126