Skip to main content

Module: @lexical/clipboard

Functions

$generateJSONFromSelectedNodes

$generateJSONFromSelectedNodes<SerializedNode>(editor, selection): Object

Type parameters

NameType
SerializedNodeextends BaseSerializedNode

Parameters

NameType
editorLexicalEditor
selectionnull | RangeSelection | NodeSelection | GridSelection

Returns

Object

NameType
namespacestring
nodesSerializedNode[]

Defined in

lexical-clipboard/src/clipboard.ts:470


$generateNodesFromSerializedNodes

$generateNodesFromSerializedNodes(serializedNodes): LexicalNode[]

Parameters

NameType
serializedNodesBaseSerializedNode[]

Returns

LexicalNode[]

Defined in

lexical-clipboard/src/clipboard.ts:492


$getHtmlContent

$getHtmlContent(editor): string

Parameters

NameType
editorLexicalEditor

Returns

string

Defined in

lexical-clipboard/src/clipboard.ts:47


$getLexicalContent

$getLexicalContent(editor): null | string

Parameters

NameType
editorLexicalEditor

Returns

null | string

Defined in

lexical-clipboard/src/clipboard.ts:67


$insertDataTransferForPlainText

$insertDataTransferForPlainText(dataTransfer, selection): void

Parameters

NameType
dataTransferDataTransfer
selectionRangeSelection | GridSelection

Returns

void

Defined in

lexical-clipboard/src/clipboard.ts:85


$insertDataTransferForRichText

$insertDataTransferForRichText(dataTransfer, selection, editor): void

Parameters

NameType
dataTransferDataTransfer
selectionRangeSelection | GridSelection
editorLexicalEditor

Returns

void

Defined in

lexical-clipboard/src/clipboard.ts:95


$insertGeneratedNodes

$insertGeneratedNodes(editor, nodes, selection): void

Parameters

NameType
editorLexicalEditor
nodesLexicalNode[]
selectionRangeSelection | GridSelection

Returns

void

Defined in

lexical-clipboard/src/clipboard.ts:147


copyToClipboard__EXPERIMENTAL

copyToClipboard__EXPERIMENTAL(editor, event): Promise<boolean>

Parameters

NameType
editorLexicalEditor
eventnull | ClipboardEvent

Returns

Promise<boolean>

Defined in

lexical-clipboard/src/clipboard.ts:512