Skip to main content

Module: @lexical/link

Classes

Type Aliases

SerializedAutoLinkNode

Ƭ SerializedAutoLinkNode: Spread<{ type: "autolink" ; version: 1 }, SerializedLinkNode>

Defined in

lexical-link/src/index.ts:259


SerializedLinkNode

Ƭ SerializedLinkNode: Spread<{ rel?: null | string ; target?: null | string ; type: "link" ; url: string ; version: 1 }, SerializedElementNode>

Defined in

lexical-link/src/index.ts:33

Variables

Const TOGGLE_LINK_COMMAND: LexicalCommand<string | { rel?: string ; target?: string ; url: string } | null>

Defined in

lexical-link/src/index.ts:336

Functions

$createAutoLinkNode

$createAutoLinkNode(url, attributes?): AutoLinkNode

Parameters

NameType
urlstring
attributes?Object
attributes.rel?null | string
attributes.target?null | string

Returns

AutoLinkNode

Defined in

lexical-link/src/index.ts:320


$createLinkNode

$createLinkNode(url, attributes?): LinkNode

Parameters

NameType
urlstring
attributes?Object
attributes.rel?null | string
attributes.target?null | string

Returns

LinkNode

Defined in

lexical-link/src/index.ts:243


$isAutoLinkNode

$isAutoLinkNode(node): node is AutoLinkNode

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is AutoLinkNode

Defined in

lexical-link/src/index.ts:330


$isLinkNode

$isLinkNode(node): node is LinkNode

Parameters

NameType
nodeundefined | null | LexicalNode

Returns

node is LinkNode

Defined in

lexical-link/src/index.ts:253


toggleLink(url, attributes?): void

Parameters

NameType
urlnull | string
attributesObject
attributes.rel?null | string
attributes.target?null | string

Returns

void

Defined in

lexical-link/src/index.ts:346