Drafts 23 Released - Advanced Search, "Draft" Widget

Drafts 23 has been released:

r23

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

Drafts 23 iOS Release Notes

Draft Widget

“Draft” widget type to display the content of a specific draft. This is in addition to Grid and List widget types released in the previous update. After adding the widget, edit options to select draft and display options. Tapping the widget opens the selected draft. Useful for keeping a scratchpad draft, or similar. More on Widgets.

Advanced Search Queries

Drafts searches support powerful new query options. These options apply to anywhere drafts are searched, including the draft list, workspaces quick search, and scripted queries:

  • Not new, but searches can use quotation marks to find “exact phrases”, and prefix a term with a hyphen to omit it, like -blue.
  • Support for title: and tag: prefixes to force a query to only look for a term in draft titles or tags. May be combined with exact phrase searching, so title:"My Draft" will look for only drafts with the string “My Draft” in the first line.
  • AND and OR operator support. AND is not needed, as it is assumed as the operator at any space between terms. Examples:
  • blue OR green would find any drafts with either “blue” or “green” in the text.
  • blue red OR green would find drafts with both “blue” and “red” or only “green”.
  • Regular expression terms. Marked by wrapping a term in forward slashes (/term/). Examples (not necessarily useful ones):
    • /.*ABC.*/ would find any drafts with “ABC” in the text.
    • /\d+/ would find any drafts that start with a number.
    • /.*\[\[.*\]\].*/ would find drafts with [[wiki-style]] links

More details on available search options can be found in the User Guide.

Other Updates

  • Small but useful change: When searching the action list, groups appear as separators. It is now possible to tap on those group separators to load the group in the list.
  • List widget now has “All” as a folder selection option.
  • List widget supports small widget size, displaying only the one top draft in the workspace.
  • “Open App” command option for widgets which just opens Drafts like tapping the app icon (not the “Empty” option already does this, too, but that’s not clear)
  • “Duplicate” swipe action in Workspace manager.
  • [[display_title]] and [[body_preview]] template tags. These match the trimmed display versions of the title and body displayed in the draft list. Template tag reference.
  • If /open URL with title parameter finds more than one matching draft, the resulting search now opens with title:"value" search to limit results to only matching titles.
  • “Save Current” option in workspaces menu to create a new workspace based on current list options.
  • draft.bodyPreview(maxLength: Int) function. Returns trimmed body preview similar to what is used in the draft list, removing first line and trimming whitespace and truncating to the requested length.
  • Disable smart quotes-dashes in find window.
  • Add way to enable link mode from action bar selection view.
  • Import from backup might not maintain correct modification dates.
  • Restore “Miscellaneous” category of action icons, which was missing for some reason.
  • Widget intent configuration options should not appear in the Shortcuts app.
  • Continuing search from Spotlight should go to quick search when available.
  • Issue with automatic changes between dark-light mode not updating editor text properly.
  • XML-RPC requests might improperly entify parameter strings.
  • Workspaces using date filters would display incorrect counts in a Widget.
  • app.showDraftList() called with a pinned draft list on iPad could result in greyed out editor.
5 Likes

Drafts 23 macOS Release Notes

Advanced Search Queries

Drafts searches support powerful new query options. These options apply to anywhere drafts are searched, including the draft list, workspaces quick search, and scripted queries:

  • Not new, but searches can use quotation marks to find “exact phrases”, and prefix a term with a hyphen to omit it, like -blue.
  • Support for title: and tag: prefixes to force a query to only look for a term in draft titles or tags. May be combined with exact phrase searching, so title:"My Draft" will look for only drafts with the string “My Draft” in the first line.
  • AND and OR operator support. AND is not needed, as it is assumed as the operator at any space between terms. Examples:
  • blue OR green would find any drafts with either “blue” or “green” in the text.
  • blue red OR green would find drafts with both “blue” and “red” or only “green”.
  • Regular expression terms. Marked by wrapping a term in forward slashes (/term/). Examples (not necessarily useful ones):
    • /.*ABC.*/ would find any drafts with “ABC” in the text.
    • /\d+/ would find any drafts that start with a number.
    • /.*\[\[.*\]\].*/ would find drafts with [[wiki-style]] links

More details on available search options can be found in the User Guide.

Other Updates

  • Small but useful change: When searching the action list, groups appear as separators. It is now possible to tap on those group separators to load the group in the list.
  • “Duplicate” swipe action in Workspace manager.
  • [[display_title]] and [[body_preview]] template tags. These match the trimmed display versions of the title and body displayed in the draft list. Template tag reference.
  • If /open URL with title parameter finds more than one matching draft, the resulting search now opens with title:"value" search to limit results to only matching titles.
  • “Save Current” option in workspaces menu to create a new workspace based on current list options.
  • draft.bodyPreview(maxLength: Int) function. Returns trimmed body preview similar to what is used in the draft list, removing first line and trimming whitespace and truncating to the requested length.
  • Import from backup might not maintain correct modification dates.
  • Restore “Miscellaneous” category of action icons, which was missing for some reason.
  • XML-RPC requests might improperly entify parameter strings.
  • Better quit behavior, trying to make sure any current changes are synced to cloud, if possible.
  • Clicking a task in a draft open in multiple windows would not immediately update other windows as it should.
  • Scripted prompt in an action called via app.queueAction might not display.
1 Like