Skip to main content

@lexical/react/LexicalAutoLinkPlugin

Functions​

AutoLinkPlugin()​

AutoLinkPlugin(__namedParameters): Element | null

Defined in: packages/lexical-react/src/LexicalAutoLinkPlugin.ts:63

Automatically converts text that matches one of the provided matchers into AutoLinkNodes as the user types, and reverts them back to plain text when they no longer match. Provide onChange to react to links being created, updated, or removed, and excludeParents to skip matching inside particular ancestor nodes. The editor must have the AutoLinkNode registered.

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

Parameters​

__namedParameters​
excludeParents?​

(parent) => boolean[]

matchers​

LinkMatcher[]

onChange?​

ChangeHandler

Returns​

Element | null

null, this plugin renders no DOM of its own.

References​

ChangeHandler​

Re-exports ChangeHandler


createLinkMatcherWithRegExp​

Re-exports createLinkMatcherWithRegExp


LinkMatcher​

Re-exports LinkMatcher