Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Action

In addition to being able to lookup an action using the find method, a single global action object is created and available in scripts to inquire about the current action and control flow.

Example

// find action
let action = Action.find("Copy");

// queue to action to run after the current action
app.queueAction(action, draft);

Hierarchy

  • Action

Index

Identification Properties

Other Properties

Methods

Identification Properties

Readonly installURL

installURL: string

URL which can be used to install this Action in another installation of Drafts. Useful for sharing and backups.

Readonly name

name: string

The display name of the action as displayed in the action list.

Readonly uuid

uuid: string

The unique identifier of the action group.

Other Properties

Readonly isSeparator

isSeparator: boolean

If true, the action is a separator.

Methods

Static find

  • find(name: string): Action | undefined
  • Search for action matching the name passed and return it if found. Useful to lookup and action and queue it to be run using app.queueAction(action, draft)

    Parameters

    • name: string

      Name of a valid, installed action.

    Returns Action | undefined

Generated using TypeDoc