Trilium Electron API
    Preparing search index...

    Interface SecurityToggleApi

    Asks to change a security setting, which the platform's own confirmation gates.

    Both methods resolve true only when the user agreed and the change was written; applying it takes a restart. The confirmation belongs to the platform rather than to the page, because a note script can reach every dialog the application draws for itself: the desktop asks the operating system, and the browser build asks the browser.

    interface SecurityToggleApi {
        setBackendScriptingEnabled(enabled: boolean): Promise<boolean>;
        setSqlConsoleEnabled(enabled: boolean): Promise<boolean>;
    }

    Hierarchy (View Summary)

    Index
    • Requests backend script execution be turned on or off.

      Parameters

      • enabled: boolean

      Returns Promise<boolean>

    • Requests the SQL console be turned on or off.

      Parameters

      • enabled: boolean

      Returns Promise<boolean>