Trilium Electron API
    Preparing search index...

    Interface ElectronContextMenuParams

    Parameters delivered by the main process to the renderer when the user opens the system context menu (right-click) somewhere inside a web view.

    Mirrors the subset of fields from Electron's Electron.ContextMenuParams that the renderer actually consumes when building its custom context menu.

    interface ElectronContextMenuParams {
        dictionarySuggestions: string[];
        editFlags: { canCopy: boolean; canCut: boolean; canPaste: boolean };
        isEditable: boolean;
        linkText: string;
        linkURL: string;
        mediaType: string;
        misspelledWord: string;
        selectionText: string;
        x: number;
        y: number;
    }
    Index

    Properties

    dictionarySuggestions: string[]

    Spell-check suggestions for misspelledWord, in order of relevance.

    editFlags: { canCopy: boolean; canCut: boolean; canPaste: boolean }

    Hints about which clipboard operations are currently available.

    Type Declaration

    • canCopy: boolean

      Whether the selection can be copied to the clipboard.

    • canCut: boolean

      Whether the selection can be cut to the clipboard.

    • canPaste: boolean

      Whether the clipboard contents can be pasted at the cursor.

    isEditable: boolean

    Whether the element under the cursor is editable (input, textarea, contenteditable).

    linkText: string

    Visible text of the link the user clicked on, or an empty string.

    linkURL: string

    URL of the link the user clicked on, or an empty string if not on a link.

    mediaType: string

    Media kind under the cursor (e.g. "none", "image", "video", "audio").

    misspelledWord: string

    The misspelled word under the cursor, or an empty string if none.

    selectionText: string

    Currently selected text, or an empty string if nothing is selected.

    x: number

    Horizontal position of the click, in CSS pixels, relative to the web view.

    y: number

    Vertical position of the click, in CSS pixels, relative to the web view.