Trilium Electron API
    Preparing search index...

    Interface ElectronClipboardApi

    Renderer access to the system clipboard for cases the standard Web API can't cover.

    interface ElectronClipboardApi {
        copyImageToClipboard(buffer: Uint8Array): void;
        readText(): Promise<string>;
    }
    Index

    Methods

    • Writes a raw image (PNG-encoded bytes) to the system clipboard so it can be pasted into other applications as an image rather than as a file.

      Parameters

      • buffer: Uint8Array

      Returns void

    • Reads plain text from the system clipboard via the main-process electron.clipboard. Used instead of navigator.clipboard.readText() so the renderer's deny-by-default permission policy does not have to grant the sensitive clipboard-read permission to the whole session.

      Returns Promise<string>