Module: @lexical/html
Functions
$generateHtmlFromNodes
▸ $generateHtmlFromNodes(editor
, selection?
): string
Parameters
Name | Type |
---|---|
editor | LexicalEditor |
selection? | null | BaseSelection |
Returns
string
Defined in
packages/lexical-html/src/index.ts:67
$generateNodesFromDOM
▸ $generateNodesFromDOM(editor
, dom
): LexicalNode
[]
How you parse your html string to get a document is left up to you. In the browser you can use the native DOMParser API to generate a document (see clipboard.ts), but to use in a headless environment you can use JSDom or an equivalent library and pass in the document here.
Parameters
Name | Type |
---|---|
editor | LexicalEditor |
dom | Document |
Returns
Defined in
packages/lexical-html/src/index.ts:41
getConversionFunction
▸ getConversionFunction(domNode
, editor
): DOMConversionFn
| null
Parameters
Name | Type |
---|---|
domNode | Node |
editor | LexicalEditor |
Returns
DOMConversionFn
| null