Options
All
  • Public
  • Public/Protected
  • All
Menu

ThoughtAsylum Drafts Library

Index

Type aliases

TYPE_intCountBase

TYPE_intCountBase: 0 | 1

Count empty strings as 0 or 1 line.

TYPE_logMode

TYPE_logMode: "prepend" | "cursor" | "append"

Valid modes usable by TA_logToDraft* functions. Determines whether to log text to the start of the draft, the current cursor position (valid for current draft only), or the end of the draft.

TYPE_strFilter

TYPE_strFilter: "inbox" | "archive" | "flagged" | "trash" | "all"

Query filter for the different folder sets available in Drafts For a review of what these correspond to, see this post on folders in Drafts.

TadConsole_action

TadConsole_action: { createdAt: string; uuid: string }

A set of properties about an action.

Type declaration

  • createdAt: string

    The name of the action. e.g. TAD-Sort All - Alphabetic

  • uuid: string

    The unique identifier of the action. e.g. DF74859E-85B4-4391-B06F-ADE7739B7180.

TadConsole_draft

TadConsole_draft: { uuid: string; version: TadConsole_draftVersion }

A set of properties about a draft.

Type declaration

  • uuid: string

    The unique identifier of the draft. e.g. DF74859E-85B4-4391-B06F-ADE7739B7180.

  • version: TadConsole_draftVersion

    A set of properties about the draft version at the point at which this set of properties was populated.

TadConsole_draftVersion

TadConsole_draftVersion: { createdAt: string; number: number; uuid: string }

A set of properties about a draft version.

Type declaration

  • createdAt: string

    Date & time of when the version was created. e.g. Sun Jul 19 2020 07:08:09 GMT+0100 (BST)

  • number: number

    Which version in reverse chronological order the version is. e.g. 1.

  • uuid: string

    The unique identifier of the draft version. e.g. DF74859E-85B4-4391-B06F-ADE7739B7180.

TadConsole_logEntry

TadConsole_logEntry: { code: string; entry: number; stamp: number; type: string }

An object describing a log entry in an advanced logging object defined by the class TadConsole.

Type declaration

  • code: string

    An optional alternate/sub-classification of a log entry. e.g. W01.

  • entry: number

    The text entry to be logged.

  • stamp: number

    A timestamp at which the logging occurred. e.g. 2020-07-20-19.18.17.160.

  • type: string

    An optional classification of a log entry. e.g. WARNING.

navigationMarker

navigationMarker: { label: string; length: number; level: number; location: number; prefix: string }

Drafts navigation marker - a standard structure within Drafts.

Type declaration

  • label: string

    Label text for the marker.

  • length: number

    The number of characters in the range.

  • level: number

    Indentation level of the marker.

  • location: number

    The start location of the range of text representing the marker.

  • prefix: string

    Prefix text for the marker. Example: H1, H2 in Markdown

selectionRange

selectionRange: Array<number>

An array of numbers containing the location (index in string), and length (number of characters) of a text selection.

Variables

Const TA_DRAFTS_SYNTAX

TA_DRAFTS_SYNTAX: string[]

This is an array of standard Drafts syntaxes in the order the appear in the Drafts user interface.

  • Plain Text
  • Markdown
  • MultiMarkdown
  • GitHub Markdown
  • Simple List
  • Taskpaper
  • JavaScript

tadCmd

tadCmd: TadCommand

This is an instance of the TadCommand class that is utilised by the library, and can be utilised in any scripts using the library.

tadCon

tadCon: TadConsole

This is an instance of the TadConsole class that is utilised by the library, and can be utilised in any scripts using the library.

tadData

tadData: TadData

This is an instance of the TadData class that is initialised during the library load. It can be utilised in any scripts using the library, and data is stored in the file location specified by the dataPath property of the tadLib instance of the TadLibrary class.

tadInfo

tadInfo: TadInfo

This is an instance of the TadInfo class that is urilised by the library, and can be utilised in any scripts using the library.

tadLib

tadLib: TadLibrary

This is an instance of the TadLibrary class that is utilised by the library, and can be utilised in any scripts using the library.

tadMisc

This is an instance of the TadMiscellaneous class that is utilised by the library, and can be utilised in any scripts using the library.