Drafts 47 has been released:
Details below. For a complete history of updates, visit the release notes.
LIKE STICKERS? We still have a pretty good supply of free Drafts Stickers, if anyone is interested. See details on requesting yours!
47.0
Action Configuration
Sometimes, actions shared by other users (from the Directory or export) may require certain values be configured for them to work correctly in your install of Drafts. This includes values like host names for services, folder names to target, etc. Or, they might simply wish to have a preference-style setting that effects how the action behaves – like, say, a Markdown Emphasis action that could be configured to use “_” or “*” as the markup.
Up to now, configuring those options has often required a clumsy process of directly editing values in a script other action steps in the action itself – and often presented issues for action authors needing to set up dummy values in the action when shared.
Starting in this update, a new action configuration system has been added. By defining “Configured Value” steps in an action, the author can set up these options. After installing an action with configured values, the first time it is run, the user will be prompted to configure the options specific to their install – and can update those values later by selection “Configure” on the action’s contextual menu.
To see configuration in practice, see these two updated Markdown actions which support the configuration of the preferred markup character:
- Markdown Emphasis: Allows the markup character used for emphasis (
_
or*
) to be configured. - Markdown List: Allows the markup character used for lists (
-
or*
) to be configured.
We will be updating more example actions to support configuration in the coming weeks.
For more details on using action configuration, see the full documentation.
TextExpander iOS SDK Removed
TextExpander discontinued support for their iOS app, and along with it the SDK used to integrate with third-party apps. We have left the integration active for the last couple of years to support people still using TextExpander’s discontinued app on iOS, but have finally removed that support in this update for a variety of technical reasons.
These change do not effect use of TextExpander on Mac, which operates at the system level and has never required any special integration. If you wish to continue to use TextExpander with Drafts on iOS, they have a beta keyboard available for testing. For more background, see our post from 2022 about these pending changes.
Shortcut
Scripting
It has always been possible to call shortcuts from Drafts, either using the Run Shortcut action step or CallbackURL
scripting, but the later required you construct URLs and was not as simple as could be. This update adds a new Shortcut
script object to simplify calling a shortcut and getting results from it. In a simple case:
let shortcut = Shortcut.create("MY-SHORTCUT-NAME", draft.content)
if (shortcut.run()) {
// if here, the shortcut ran successfully
// show an alert with the result text
alert(shortcut.result)
}
This makes it easier to incorporate Shortcuts that publish to other services, manipulate text, or other tasks.
See scripting reference for more details
Prompt
Improvements
Many actions in Drafts make use of the Prompt
script object to create and display dialogs and alerts, both informational and to gather input. Prompts got a variety of minor visual tweaks in this update, as well as being extended with two new functions:
addDivider()
: adds a visual separator line. Useful for creating visual grouping in prompts with number fields. (docs)addNumberField(name, label, initialValue, allowDecimals)
: Adds an input specifically configured to only accept numeric values. (docs)
See script reference for additional details.
Other Updates and Changes
- All Platforms
- Fix: Using
app.selectDraft
more than once in the same action would return the first draft selected if the second selection was cancelled. - Fix: Issue with pause not disabling auto-close in new text-to-speech UI.
- Fix: Using
- iOS
- Fix: Issue creating action groups in group manager.
- Fix: Deleting multiple actions in the action manager might not keep all deletions.