Trilium Electron API
    Preparing search index...

    Interface ElectronApi

    The complete surface exposed to the renderer as window.electronApi via contextBridge. The renderer must access Electron-only functionality through this object — direct require("electron") and @electron/remote are unavailable because nodeIntegration is disabled and contextIsolation is enabled.

    The runtime value lives in apps/desktop/src/preload.ts; this interface is the contract both the preload script (satisfies ElectronApi) and the client (window.electronApi) share.

    Index

    System clipboard access beyond what the standard Web Clipboard API offers.

    Native context-menu plumbing for right-click events on web contents.

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

    Desktop-native large-.zip import that reads the user's file in place via a capability token.

    Read/write access to Chromium's back/forward navigation history.

    OneNote importer sign-in via a loopback OAuth redirect (desktop only).

    Printing and PDF export pipeline.

    Security settings (backend scripting, SQL console) stored outside the DB.

    Shell integration — opening URLs, files, and downloads with OS handlers.

    Chromium spell checker controls (dictionary, language list).

    systemIntegration: ElectronSystemIntegrationApi

    OS integration — system tray and autostart / launch-on-login.

    Window chrome, zoom, theme, lifecycle, and main → renderer events.

    In-process bridge that replaces the renderer↔server WebSocket.