Drafts defines a single global
app object which provides access to application level functions.
Returns the active theme mode, light or dark, taking into account automatic switching of themes if active. If writing scripts to branch logic based on the current mode, this is the best property to use.
Is the action list side panel is visible.
Is the draft list side panel is visible.
Is system sleep timer disabled preventing screen dimming/sleep.
Get or set themeMode.
Version number of current installation of Drafts.
Apply the Workspace as if it was selected in draft list.
Show error banner notification with the message passed.
Show info banner notification with the message passed.
Show success banner notification with the message passed.
Show warning banner notification with the message passed.
Get current contents of the system clipboard.
Close action list side bar.
Close draft list side bar.
Takes HTML string and converts it to rich-text and places it in the system clipboard. Returns true if successful, false if an error occurred in conversion.
a possibly-valid html string
Load the ActionGroup in the action list side bar.
opens URL passed using iOS. Returns true if URL was opened, false if the URL was invalid or no available app can open the URL on the device.
url to open
whether to use the Safari View Controller (true) or default browser (false).
Open draft selection interface and wait for user to select a draft. Returns the select draft object, or
undefined if user cancelled.
Set the contents of the system clipboard.
Enable and disable the iOS system sleep timer to prevent screen dimming/sleep.
Open action list side bar.
Open draft list side bar.
Generated using TypeDoc