Properties relating the context surrounding the selected text.

interface Context {
    appIdentifier: string;
    appName: string;
    browserTitle: string;
    browserUrl: string;
    canCopy: boolean;
    canCut: boolean;
    canPaste: boolean;
    hasFormatting: boolean;
}

Properties

appIdentifier: string

The bundle identitifier of the current app, for example com.agiletortoise.Drafts-OSX.

appName: string

The name of the current app, for example Drafts.

browserTitle: string

If the current app is a compatible browser, this will be the page title.

browserUrl: string

If the current app is a compatible browser, this will be the page URL.

canCopy: boolean

This property is true iff text was selected.

canCut: boolean

This property is true iff text was selected and the app's Cut command is enabled.

canPaste: boolean

This property is true iff the Paste command is enabled in the current app.

hasFormatting: boolean

Indicates whether the text area supports formatting.