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.
If able, open the requested draft in a new window. This method only functions on iPad and Mac. The ability to open new windows is not available on iPhone.
true if successful.
false if unable to open a new window (as on iPhone).
Request system opens the URL passed. 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 the "Get Info" view for a draft. If no draft is passed, the current active draft in the editor will be used.
Open draft list side bar.
Open quick search window, optionally providing a initial query value.
Generated using TypeDoc