Represents a Workspace. Can be used to inquire and load workspaces and apply them using methods on the App object.
Note that is can also be useful in script to create and load temporary workspaces to apply filters or query drafts. If you create a new
Workspace object and never call
update() that workspace will not be saved after the end of an action's execution.
Find and Load Workspace
// find workspace and load it in drafts list
let workspace = Workspace.find("Projects");
Should flagged drafts be included in archive.
Should flagged drafts be included in inbox.
Action group to load in Action Bar when applying the workspace.
Action group to load in action list when applying the workspace.
Folder tab to select when applying the workspace.
Preferred dark theme to load when applying the workspace.
Preferred light theme to load when applying the workspace.
Show date information in list.
Show last logged action for draft in list.
Show preview of draft body in list.
Show draft tags in list.
A QueryDate specifying a date which all drafts in the workspace must be less than or equal to.
Filter by flagged status of drafts.
Search string to filter results.
A QueryDate specifying a date which all drafts in the workspace must be greater than or equal to.
Comma-delimited list tag string like "blue, !green" using "!" to omit a tag.
true, all (AND) tags in the tag filter must match, if
false match any of the tags (OR)
URL which can be used to install this Workspace in another installation of Drafts. Useful for sharing and backups.
The name of the workspace.
Create new instance.
Query for a list of drafts contained in the workspace.
Save changes made to the workspace to the database. This must be called to save changes.
create a new workspace object. This is an in-memory object only, unless
update() is called to save the it. The initial state of the workspace properties is based on the configuration of the user's default workspace.
Search for workspace matching the name passed and return it if found. Returns undefined if not found.
Get list of all available workspaces.
Set sort order for "all" drafts folder.
Set sort order for archive.
Set sort order for flagged.
Set sort order for inbox.
Generated using TypeDoc