Trilium Frontend API
    Preparing search index...

    Interface OptionsDownload

    interface OptionsDownload {
        downloadConfig?: AdditionalExportOptions;
        downloadDataFormatter?: (data: any) => any;
        downloadEncoder?: (fileContents: any, mimeType: string) => false | Blob;
        downloadReady?: (fileContents: any, blob: Blob) => false | Blob;
        downloadRowRange?: RowRangeLookup;
    }

    Hierarchy (View Summary)

    Index

    Properties

    downloadConfig?: AdditionalExportOptions

    By default Tabulator includes column headers, row groups and column calculations in the download output.

    You can choose to remove column headers groups, row groups or column calculations from the output data by setting the values in the downloadConfig option in the table definition:

    downloadDataFormatter?: (data: any) => any

    If you want to make any changes to the table data before it is parsed into the download file you can pass a mutator function to the downloadDataFormatter callback.

    downloadEncoder?: (fileContents: any, mimeType: string) => false | Blob

    The downloadEncoder callback allows you to intercept the download file data before the users is prompted to save the file.

    The first argument of the function is the file contents returned from the downloader, the second argument is the suggested mime type for the output. The function is should return a blob of the file to be downloaded.

    downloadReady?: (fileContents: any, blob: Blob) => false | Blob

    The downloadReady callback allows you to intercept the download file data before the users is prompted to save the file.

    In order for the download to proceed the downloadReady callback is expected to return a blob of file to be downloaded.

    If you would prefer to abort the download you can return false from this callback. This could be useful for example if you want to send the created file to a server via ajax rather than allowing the user to download the file.

    downloadRowRange?: RowRangeLookup

    By default, only the active rows (rows that have passed filtering) will be included in the download the downloadRowRange option takes a Row Range Lookup value and allows you to choose which rows are included in the download output.