Module: @lexical/file
Functions
exportFile
▸ exportFile(editor
, config?
): void
Generates a .lexical file to be downloaded by the browser containing the current editor state.
Parameters
Name | Type | Description |
---|---|---|
editor | LexicalEditor | The lexical editor. |
config | Readonly <{ fileName? : string ; source? : string }> | An object that optionally contains fileName and source. fileName defaults to the current date (as a string) and source defaults to lexical. |
Returns
void
Defined in
packages/lexical-file/src/fileImportExport.ts:66
importFile
▸ importFile(editor
): void
Takes a file and inputs its content into the editor state as an input field.
Parameters
Name | Type | Description |
---|---|---|
editor | LexicalEditor | The lexical editor. |
Returns
void
Defined in
packages/lexical-file/src/fileImportExport.ts:19