Changelog

5.6.0

Workspace improvements

Workspaces learned a few new tricks in this release:

Workspaces can now optionally load action groups in the action list and extended keyboard when applied. This is useful when a workspace is configured for working draft of a particular syntax, or project, and you want the related actions handy.

Workspaces can now optionally switch the selected list tab (inbox, flagged, etc.) when applied. Saves some taps if a workspace is used to browse the archive primarily or similar.

Other updates and changes

New: Return of the “All” tab in the draft list. This tab shows both inbox and archived drafts at the same time - which is sometimes handy when searching.

New: Handy quick-add URL scheme to allow easy creation of Drafts actions which call Shortcuts app shortcuts. Allows replication of the “Add to Drafts” option Workflow offered, along with a few extra options. For details and a sample “Add to Drafts” shortcut, see:

New: Prompts now support a default button which appears fixed at bottom with cancel button.

In prompt action step, if only one button is used, it will be made the default button.

In scripted prompts, the addButton method can now take an additional isDefault boolean parameter. So, p.addButton("Name", "value", true) would make that button the default button fixed at the bottom of the prompt. Only one button can be the default. If a scripted prompt only adds one button, it will be assumed to be the default button.

The default button will be the one to respond to CMD-Return external keyboard shortcut.

New: Template markdown blocks (%% %%) can now take a format type specifier to override default Markdown options. Useful when a specific action needs to render using a different Markdown engine.

%%text%% will render text with default Markdown options as always

%%githubmarkdown|text%% will force use of GitHub Markdown.

%%multimarkdown|text%% will force use of MultiMarkdown

New:Base64.encode(string) and Base64.decode(string) methods for handling Base64 in scripts.

Other Fixes

Change: General pass of minor UI improvements

Fix: Address issue where actions which altered text in the editor being called repeatedly and quickly - typically via repeating keyboard shortcut or quickly tapping extended keyboard row button - could cause the draft to revert to a previous version when sync changes were processed in the background.

Fix: Properly theme clear button and placeholder text in search fields and a number of fields in settings and action configurations.

Change: Updates document icons for associated file types.

Change: Adjust launch image slightly.

Change: Tapping on tag in recent tag suggestions should not reorder the list.

Fix: Using [[line|n..]] range could omit last line. This was a regression in the previous release.

Fix: Auto-list completion now participates correctly in the undo history.

Fix: List auto-completion now enabled for MultiMarkdown syntax.

5.5

In addition to some non-obvious changes preparing for the upcoming release of Drafts for Mac (learn more at: https://getdrafts.com/mac/beta), this release brings the following updates:

Markdown Updates

Drafts 5.5 brings significant new customizations for advanced Markdown users, letting you tailor the Markdown used in Drafts to specific needs. These customizations are in two parts.

MultiMarkdown & GitHub Markdown Syntax Highlighting: In addition to the default “Markdown” syntax highlighting option, there are new “MultiMarkdown” and “GitHub Markdown” syntax options which add highlight for some of the extensions specific to those flavors of Markdown. The default “Markdown” syntax has been simplified to more closely match the original Markdown specification as well. If you prefer one of these advanced highlighting options, you may wish to select it as your default for new drafts. More details

Markdown Processor Options: Markdown options have been added in setting to control the Markdown rendering used in templates and previews. It is now possible to choose between MultiMarkdown and GitHub Markdown when rendering, as well as control many advanced options provided by these renderers. More details

Workspace, List Options Additions

The draft list, and Workspaces, can now optionally sort flagged drafts to the top of the list in the inbox and archive - and the option to omit flagged drafts that has been available for the inbox is now also available for the archive. The Workspace script object has also been extended to support these features. More details in list options and Workspaces documentation.

Other Additions, Changes and Fixes in 5.5

New:[[line]] template tag now has support for negative indexes in ranges which count back from last line, like [[line|-1]] returns last line draft, [[line|-2..-1]] returns last two lines. Templates and tags documentation

Fix: Crasher in template processing when importing template from file with [[template|path.txt]] when the template was very short.

Fix: Some layout issues on SE size phones.

Fix: If only omitted tags were in the draft list tag filter, the filter status did not display properly.

5.4.3

General Additions

Searching drafts in the draft list now supports “quoted strings” and -negated strings, Google style. e.g. You can search for "red dress" -blue and only drafts containing the full phrase red dress and NOT containing blue will be returned.

Global ⇧-⌘-F search drafts external keyboard shortcut.

“Merge” operation now has option on whether to place originals in archive, trash or leave them where they are.

“Rename Tag” and “Delete Tag” operations in drafts list operations to globally rename or remove a tag across all drafts.

[[template|path.txt]] template tag to load a template from a file in the /Drafts/Library/Templates folder in iCloud Drive. Docs

Scripting Additions

Workspace scripting object now has full support for creation and editing of workspaces, as well as the ability to query for drafts contained in the workspace. Docs

require(path); global script function which imports content of script in the /Drafts/Library/Scripts folder in iCloud Drive. Useful to reuse script libraries across actions, or when developing new scripts in an external editor. Docs

5.4

Note: An additional 5.4.1 release is planned for release before September 24, 2018 to fully support new Apple Watch Series 4 and iPhone XS, etc., models.

Siri & Shortcuts Support (iOS 12 Required)

“Run Shortcut” action step. Pass text to the Shortcuts app and trigger a Shortcut by name with a single tap. This is the same functionality available in the “Run Workflow” action step, updated for the new Shortcuts app. Details

Siri Intents:

“Capture clipboard” Siri shortcut. This shortcut allows capture of the current clipboard content to a new draft in Drafts without launching the app.

“View draft” Siri Shortcut. Allows creation of a shortcut which displays the content of a specific draft in the Siri interface - with the ability to tap and open that draft in the app. Great for previewing lists, or regularly view reference notes.

“Add to Siri” buttons to create voice shortcuts to functions in Drafts directly in the app in the following locations (iOS 12 only):

Add shortcut to open a specific draft in the (i) detail view.

Add shortcut to load a workspace on Workspace edit screen.

Add shortcut to run an action without input text from the action edit screen.

Drafts creates shortcuts as the app is used for a variety of other tasks, such as using the Drafts dictation interface. As you use Drafts, these become available in iOS Settings > Siri & Search and can be attached to custom Voice Shortcuts. A common example would be to create a “Dictate” voice shortcut that launches Drafts directly to dictation of a new draft.

Watch the community site for more information and guides to using Shortcuts with Drafts in the coming weeks.

Expanded Google Drive support for Google Docs and PDFs

Template output of a Google Drive action step can be selected between Text, Markdown & HTML. This is similar to setting on Evernote steps and determines how the output of the content template will be treated.

Upload type allows you select the type of result file. If “Text”, well, you’ll get a text file. This is the only type that supports append/prepend. If “Google Doc” or “PDF”, Google drive will convert the uploaded file to those formats. When combined with HTML template output, you can create fully-styled documents and PDFs.

Full Dropbox API Scripting

Dropbox script object exposes entire Dropbox API. New rpcRequest, contentDownloadRequest and contentUploadRequest methods wrap and expose the entire Dropbox API. This is an advanced feature and requires direct API knowledge, but it is possible now to create share links, list files, folders, query files and version, create Paper documents, etc. Anything you can do with the API, essentially. Details in the Scripting Reference.

Other New Features in 5.4

Separators in action groups. Separators act like headings and allow for visual organization of actions in a large action group or keyboard rows. Each has a full text name for the action list, and optional shorter key label for display in the keyboard row. Create them using the “+” button in the action list. Manage them just like an action - drag and drop to move the around, etc.

Light Gray theme.

XMLRPC.request(url, methodName, params) script method to interface with XML-RPC based services. Takes care of creation and decoding of XML needed to interact such services. Suitable far wrapping XML-RPC based APIs like the MetaWeblog API or others.

Toggle device sleep off and on via script.app.isIdleDisabled and app.setIdleDisabled(bool) script methods to allow disabling of system sleep timer to keep the screen from dimming. Useful for times when you do not want to have to keep waking up your phone when referencing a draft. Example Toggle System Sleep action is available. See reference for more information

Ability to clear all version history for draft in Details (i) > Versions, or individually delete specific versions (swipe to left).

Markdown list auto-complete will now try to enable capitalization for first word of new list line if Sentence auto-capitalization is enabled.

Other Fixes and Changes in 5.4

Change: A few updates to default action groups. These will only take effect for new installations - but these groups can all be reinstalled from the Action Directory

Change: Make “edit” the default swipe option for Workspaces in Workspace list.

Prompt addButton method can now take optional second value parameter. When provided, the the buttonPressed property will be returned as the value instead of the button name. Value can be any data type. Useful for associating non-string values with a prompt button, or simply alternate string values.

Prompt addTextField and addTextView options parameter can now accept a wantsFocus boolean value to hint that the field should be focused for editing when the prompt is displayed. Should only be set on one field in the prompt.

Prompts with only one button will treat that one button as the default action and continue with CMD-Return on external keyboard as if that button was pressed.

ReminderList object now has getAllReminderLists() and find(title) methods to match those on Calendar object.

Learning resources page in Settings for easy access to community site, screencasts, etc.

Change: Refactored all handling of “after success” settings on actions to avoid a few edge cases where the move to archive/trash might not get saved properly.

Change: General pass of tweaks to prompts to better support Dynamic text and display better.

Change: Tweaks to Markdown bold/italic syntax definitions.

Fix: Subproject syntax highlighting in Taskpaper.

Change: Text views will also be focused if provided in a prompt.

Fix: Issue where “after success” settings on an action might not take properly when in focus mode.

Fix: Deleting an action group in manage view should not leave edit mode.

5.2.1

New:Navigate window (access via down arrow at top right) now also offers navigation to recent drafts. Defaults to displaying recent drafts if current draft does not have any identifiable navigation markers.

New: Sprinkle in more user activity registrations.

Fix: Clean up a couple of crashers with unexpected arguments in scripting methods.

5.2.0

New in 5.2

Actions now have an “Assign tags” after success setting. In addition to moving a draft to the archive or trash, after success can now also assign tags - great for marking or filing away drafts automatically when processing them. For example, set the Tweet action to automatically assign the “tweet” tag when run on a draft and you can later easily filter for tweets. Details

In-draft navigation to jump between key marks in longer drafts. Accessed via the navigate button (down arrow icon) in the upper right (or ⌘-\ shortcut). Currently navigation supports jumping to headers in a Markdown draft, projects in a Taskpaper draft, and functions and “// #region Name” region comments in Javascript drafts. Details

Scripting additions to support switching workspaces and action groups:

Open in... action step to support old-style document interaction export. Docs and Examples

Other new bits

Workspaces and tag filters now support “All - Any” mode selection to control whether drafts in the filter should match all the selected tags (and), or any of them (or). This setting will be saved with Workspaces.

Action steps in an action can now be disabled and duplicated (swipe on step in action editing to select). Handy addition for work-in-progress step modifications and testing variants of scripts.

Recent action log history (not specific to individual drafts) is now accessible from history button at top of action list. Makes access to recently performed actions quicker. Great for troubleshooting errors as well.

Action log entries can now be deleted (Swipe right).

CMD-Return external keyboard shortcut to toggle editor focus.

Support traditional table edit mode for better VoiceOver experience.

Scripting changes

Better scripting of Calendars and Events, including the ability to read calendar events. Details:

Calendar.default property which returns the system default calendar for new events.

Calendar.find(title) method looks up a calendar by name.

Calendar.getAllCalendars(); returns array of all known calendars on the device.

events(startDate, endDate); method to query the contents of a calendar. Returns an array of Event objects. This can be used to import calendar events into a drafts, among other things.

event.edit() method. Displays a Event object in the system event editing card. Allows scripting to create modify the default values for the event (start/end, add alarms, etc.) then display the event for modification/editing and adding to the calendar.

Fix: Refactor animation to avoid oddball case where the side panels could get stuck when the cursor was in certain positions with certain content in a draft.

Fix: Threading issue scripting twitter updateStatus calls.

New: Inbox/Flagged/Archive/Trash tabs now support drag and drop. Draft drafts from list onto them to move them (or assign flags).

5.0.4

New: iMessages app is back and better than ever. With tag filtering, it makes it really easy to use Drafts as a snippet library to insert text into Messages. More information

New: Inbox/Flagged/Archive/Trash tabs in draft list now support drag and drop. Drag drafts from list onto them to move them (or assign flags).

New: “Inbox default swipe action” setting in “…” options of draft list. Allow changing of the default behavior of a full swipe on a draft in the inbox between “Archive” and “Trash”. Default is “Archive”.

New: Improvements to drafts selection screen, which is used in iMessages, the Share extension and the app.selectDraft() method. Can now be filtered by a tag and archive can be browsed. Sometime down the road it will get better filtering, but this will do for now.

Fix: [[selection]] tag not return correct result when selection was at very end of draft.

Fix: If a query was left in the draft list search field, it would get restored on a cold start of the app, but the not show in the search text in the text box making you wonder where all your drafts went.

Fix: Changes to tags made in scripting might not save if the action had after success setting.

Fix: Share extension might not immediately unlock pro features when subscription is initiated.

Fix: Clear button in recent tag suggestions would not stay in scrollable view.

Fix: Make sure custom template tags generated in an action are cleared when action is finished running.

Fix: Remove some overhead from scripts which manipulate editor selections to prevent some race conditions with the selection when actions are run quickly, repeatedly, like from a keyboard shortcut.

Fix: Case where bad tag filter could get applied to draft list after launching to search from widget.

Fix: Changing syntax highlighting for draft without making any other changes to draft did not save change.