exportFile
Release 3.3.2602+
Exports the editor content to a file. The generated file is saved to the browser's default download path.
Notes: The exported document is not guaranteed to match the imported original in appearance or fidelity. Due to structural differences between the web editor and the source format, 1:1 matching is not always possible, and some objects may be missing or rendered incorrectly.
Parameters
| Name | Type | Description |
|---|---|---|
name | string | File name to save (default: untitled) |
pageOrientation | string | portrait (default) | landscape |
exportFileFormat | string | hwpx (default, officially supported) | hwp | docx. hwp and docx may have limitations in conversion. |
Returns
| Type | Description |
|---|---|
| Promise<void> | Resolves when the export completes |
Example
editor.exportFile('Editor document', 'portrait', 'hwpx').then(() => {
console.log('Export complete.');
});