PopClip JavaScript API Reference
    Preparing search index...

    Type Alias Requirement

    Requirement:
        | "text"
        | "copy"
        | "cut"
        | "paste"
        | "formatting"
        | "url"
        | "isurl"
        | "urls"
        | "email"
        | "emails"
        | "path"
        | `option-${string}=${string}`

    A requirement is specified in the Action.requirements array as a string.

    Type Declaration

    • "text"

      One or more characters of text must be selected.

    • "copy"

      Synonym for text, retained for backward compatibility.

    • "cut"

      Text must be selected and the app's Cut command must be available.

    • "paste"

      The app's Paste command must be available.

    • "formatting"

      The selected text control must support formatting.

    • "url"

      The text must contain exactly one web URL. Narrows the text to that URL.

    • "isurl"

      The text must be a web URL, with nothing but whitespace around it. Narrows the text to that URL.

    • "urls"

      The text must contain one or more web URLs.

    • "email"

      The text must contain exactly one email address. Narrows the text to that address.

    • "emails"

      The text must contain one or more email addresses.

    • "path"

      The text must be a local file path that exists. Narrows and standardizes the path.

    • `option-${string}=${string}`

      The option with the given identifier must equal the given string. Boolean options map to 1 and 0.

    ["paste", "!urls", "option-goFishing=1"]