Drafts 26 Released - Custom Syntax & Themes

Drafts 26.0 has been released:

Details below. For a complete history of updates, visit:

r26

This release brings support for custom syntaxes and themes, which allow the Drafts editor to be extended to support additional syntax highlighting options, and the appearance of the app to be modified. Details below.

After you read all those release notes (of course you will), you can also dive into themes. We made a quick walkthrough of the install and selection process, and you can get examples from our great beta testers in the Directory:

1 Like

Drafts 26 (iOS) Release Notes

Custom Syntaxes and Themes

Drafts now supports custom editor syntaxes and themes. With this feature, Drafts can be extended to support more different markup languages than the Markdown, TaskPaper, and other syntaxes which come built-in. It also means you can install or create custom theme definitions that control the appearance of the app.

Want a slight variant of Markdown which highlights specific keywords? Want custom navigation capabilities? Different types of tappable tasks? These are all possible with custom syntaxes. You can install or make themes to tweaks colors in the editor (or the whole interface on iOS). Keep an eye on the syntaxes and themes sections of the directory. We’ve posted some starter example syntaxes for Fountain and AsciiDoc, and I’m sure we’ll be seeing more examples from beta testers coming soon.

Be sure to visit the syntaxes and themes documentation in the User Guide to learn more details about using and even creating your own syntaxes and themes!

Note that the selection and application of syntaxes and themes are scriptable, as well. Visit the Scripting Reference for information on the new Syntax and Theme objects if you are interested in automating these features.

Drafts Directory Updates

In addition to actions and workspaces, the Drafts Directory is also now a repository for custom syntaxes and themes. We look forward to seeing many new, ready-to-use examples from the community in the coming weeks.

The Directory has learned a few new tricks as well. User sharing and updating actions to the Directory can now include update notes explaining what has changed, and these will be displayed on the site.

Even better, you can now update, download, and install new versions of items installed from the Directory right in Drafts. Because this feature requires a link back to the source, it is currently only possible to find and install updates for items installed after the rollout of this feature. The update process is manual, but we plan to build on this with automatic update features in the future. About updating.

Balance While Typing

While typing, Drafts will automatically match parenthesis (), braces {}, brackets [] and quotes "". So typing (, will also insert the ), etc. If you have a text selection when typing one of these pairs, the selection will be wrapped. This feature is enabled by default, but can be turned off in editor preferences on a per-syntax basis.

Other Changes and Updates

  • New: Action Group versions. We rolled out the ability to save backup versions of actions in v22. This same feature has been extended to action groups, allowing you to make restorable backup versions of your action groups.
  • New: New pink tint color option for actions and workspaces.
  • Fix: Actions which require network access, run via URL/Shortcut, on cold start of the app could sometimes fail with a network error even though network was available.
  • Change: Better VoiceOver announcements for action completion messages.
  • Change: Update TextExpander SDK.
  • Change: Better display of items found in Spotlight search.
  • Fix: Selecting dictation from keyboard bar with external keyboard connected on iPad not working properly.
  • Fix: Hide B/I/U options in share extension text selection menu because they don’t do anything.
  • Fix: When creating reminders with Reminders and List in Reminders action steps, only set the “note” value if it will contain content. This avoids a bug in the Reminder’s watch app that displays tasks with a blank note as having a note (Watch only, this does not happen on iOS).
  • Fix: Action steps disabled on current platform could run when that action is used via an “Include Action” step.
  • Fix: Allow folder tab and action group assignments to be set on default workspace.
  • Fix: Crash passing invalid values to strftime
  • Fix: Paragraph number alignment could get off with paragraph spacing values assigned.
  • Change: Remove “launch in focus mode” preference. Session will launch with focus mode in its last active state.
  • Fix: Obscure crasher with scripted prompts with multiple pickers with different numbers of components.

Drafts 26 (Mac) Release Notes

Custom Syntaxes and Themes

Drafts now supports custom editor syntaxes and themes. With this feature, Drafts can be extended to support more different markup languages than the Markdown, TaskPaper, and other syntaxes which come built-in. It also means you can install or create custom theme definitions that control the appearance of the app.

Want a slight variant of Markdown which highlights specific keywords? Want custom navigation capabilities? Different types of tappable tasks? These are all possible with custom syntaxes. You can install or make themes to tweaks colors in the editor (or the whole interface on iOS).

Be sure to visit the syntaxes and themes documentation in the User Guide to learn more details about using and even creating your own syntaxes and themes!

Note that the selection and application of syntaxes and themes are scriptable, as well. Visit the Scripting Reference for information on the new Syntax and Theme objects if you are interested in automating these features.

Drafts Directory Updates

In addition to actions and workspaces, the Drafts Directory (https://actions.getdrafts.com/) is also now a repository for custom syntaxes and themes. We look forward to seeing many new, ready-to-use examples from the community in the coming weeks.

The Directory has learned a few new tricks as well. User sharing and updating actions to the Directory can now include update notes explaining what has changed, and these will be displayed on the site.

Even better, you can now update, download, and install new versions of items installed from the Directory right in Drafts. Because this feature requires a link back to the source, it is currently only possible to find and install updates for items installed after the rollout of this feature. The update process is manual, but we plan to build on this with automatic update features in the future. About updating.

Balance While Typing

While typing, Drafts will automatically match parenthesis (), braces {}, brackets [] and quotes "". So typing (, will also insert the ), etc. If you have a text selection when typing one of these pairs, the selection will be wrapped. This feature is enabled by default, but can be turned off in editor preferences on a per-syntax basis.

Other Changes and Updates

  • New: Action Group versions. We rolled out the ability to save backup versions of actions in v22. This same feature has been extended to action groups, allowing you to make restorable backup versions of your action groups.
  • Fix: HTML preview window not respecting dark mode.
  • Fix: Actions which require network access, run via URL/Shortcut, on cold start of the app could sometimes fail with a network error even though network was available.
  • Better keyboard navigation in prompts. Up-Down, Tab-Shift tab now mostly work, along with enter to select a focused button.
  • Change: Better VoiceOver announcements for action completion messages.
  • Change: Better display of items found in Spotlight search.
  • New: New pink tint color option for actions and workspaces.
  • Fix: When creating reminders with Reminders and List in Reminders action steps, only set the “note” value if it will contain content. This avoids a bug in the Reminder’s watch app that displays tasks with a blank note as having a note (Watch only, this does not happen on iOS).
  • Fix: Last selected range not restored when selecting draft.
  • Fix: Performance issue with filter panel open and “show only current tags” option and active tag filters.
  • Fix: Action steps disabled on current platform could run when that action is used via an “Include Action” step.
  • Fix: If default workspace is set to select a folder tab, that selection should be applied when app is first launched.
  • Fix: Crash passing invalid values to strftime in a script.
  • Change: Increase batch sizes for Spotlight indexing updates.
  • Fix: Editor margins not updating properly when running in Split View on Big Sur.
  • Change: Remove “launch in focus mode” preference. Session will launch with focus mode in its last active state.
  • Fix: Allow tags to wrap to more than one line in the capture window.