Trilium Electron API
    Preparing search index...

    Interface ElectronNativeExportApi

    Desktop-native subtree export that streams a .zip straight to a file.

    interface ElectronNativeExportApi {
        exportSubtreeToFile(
            opts: {
                branchId: string;
                format: string;
                taskId: string;
                title: string;
            },
        ): Promise<NativeExportResult>;
    }
    Index
    • Prompts a native "save as" dialog, then streams a subtree (branch) export to the chosen path on disk. This bypasses the in-memory download path, so memory stays bounded regardless of archive size. Progress/success/error are reported over the WebSocket via taskId. Resolves once the dialog is dismissed (cancelled) or the export finishes (saved / error).

      Parameters

      • opts: { branchId: string; format: string; taskId: string; title: string }

      Returns Promise<NativeExportResult>