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

NameTypeDescription
namestringFile name to save (default: untitled)
pageOrientationstringportrait (default) | landscape
exportFileFormatstringhwpx (default, officially supported) | hwp | docx. hwp and docx may have limitations in conversion.

Returns

TypeDescription
Promise<void>Resolves when the export completes

Example

editor.exportFile('Editor document', 'portrait', 'hwpx').then(() => {
    console.log('Export complete.');
});