Skip to main content

@lexical/react/LexicalPlainTextPlugin

Functions

PlainTextPlugin()

PlainTextPlugin(__namedParameters): Element

Defined in: packages/lexical-react/src/LexicalPlainTextPlugin.tsx:33

Sets up plain text editing by wiring up the core plain text commands and rendering the provided contentEditable, an optional placeholder, and any decorator nodes (wrapped in the given ErrorBoundary). Use this instead of RichTextPlugin when the editor should not support block-level rich text formatting.

This is a legacy plugin. When building an editor with the extension API, configure PlainTextExtension instead.

Parameters

__namedParameters
contentEditable

Element

ErrorBoundary

ErrorBoundaryType

placeholder?

Element | ((isEditable) => Element | null) | null = null

Returns

Element

The element tree to render inside your LexicalComposer.