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:424


$generateNodesFromSerializedNodes

$generateNodesFromSerializedNodes(serializedNodes): LexicalNode[]

Parameters

NameType
serializedNodesBaseSerializedNode[]

Returns

LexicalNode[]

Defined in

lexical-clipboard/src/clipboard.ts:446


$getHtmlContent

$getHtmlContent(editor): string

Parameters

NameType
editorLexicalEditor

Returns

string

Defined in

lexical-clipboard/src/clipboard.ts:46


$getLexicalContent

$getLexicalContent(editor): null | string

Parameters

NameType
editorLexicalEditor

Returns

null | string

Defined in

lexical-clipboard/src/clipboard.ts:66


$insertDataTransferForPlainText

$insertDataTransferForPlainText(dataTransfer, selection): void

Parameters

NameType
dataTransferDataTransfer
selectionRangeSelection | GridSelection

Returns

void

Defined in

lexical-clipboard/src/clipboard.ts:84


$insertDataTransferForRichText

$insertDataTransferForRichText(dataTransfer, selection, editor): void

Parameters

NameType
dataTransferDataTransfer
selectionRangeSelection | GridSelection
editorLexicalEditor

Returns

void

Defined in

lexical-clipboard/src/clipboard.ts:94


$insertGeneratedNodes

$insertGeneratedNodes(editor, nodes, selection): void

Parameters

NameType
editorLexicalEditor
nodesLexicalNode[]
selectionRangeSelection | GridSelection

Returns

void

Defined in

lexical-clipboard/src/clipboard.ts:148


copyToClipboard__EXPERIMENTAL

copyToClipboard__EXPERIMENTAL(editor, event): Promise<boolean>

Parameters

NameType
editorLexicalEditor
eventnull | ClipboardEvent

Returns

Promise<boolean>

Defined in

lexical-clipboard/src/clipboard.ts:466