Wiki-style markup for cross-linking between drafts, and executing basic Drafts commands. Useful for linking research notes, creating a table of content of other related drafts and more. When embedded in a draft, these become clickable links that open URLs as described below:
[[Title of Draft]] : Creates a link which will open a draft by title (first line) when clicked/tapped. Will create a draft with the title if it does not exist. This default syntax can also be expressed simply as [[d:Title of Draft]] if necessary to avoid conflicts. Title matching is loose to allow partial matches for text in the first line of draft, so [[My Title]] would also match a draft with the first line [[# My Title]].
[[u:UUID-OF-DRAFT]] : creates a link for the specific draft by UUID to allow exact linking. Will not create a draft, it must exist.
[[s:Search Term]] : creates a link which will open a quick search to the specified search
[[w:Workspace Name]] : creates a link which will load the named workspace
[[google:Search term]] : Opens a Google search for “Search term” when clicked/tapped.
[[wikipedia:Search term]] : Opens a Wikipedia page for “Search term” when clicked/tapped.
[[bear:Title of Bear Note]] : Opens a note titled “Title of Bear Note” in Bear, if it exists. This utilizes the Bear /open-note URL scheme.
These link markers are only available when using Markdown, MultiMarkdown or GitHub Markdown syntax definitions.
The Examples: Cross-Linking action group also provides example actions to facilitate cross-linking drafts in a project.
"Typewriter Scrolling" option fixes the cursor position in the middle of the editor, moving the text as you type. Feature can be enabled/disabled in the “Aa” editor settings, or via contextual menu (tap and hold) on the “Aa” button. Details
Navigate menu (down-arrow in top right) now has additional options for navigating to recent drafts.
“Last Draft” < toolbar button to go back to the last draft loaded in the editor.
Scripting additions:
Most JavaScript objects now support new keyword. So new Draft() now works in lieu of Draft.create() (old syntax still works).
title property now strictly returns the first line of draft
displayTitle property returns cleaned up title as it would be displayed in the draft list, removing Markdown header characters, etc.
lines property returns content as an array of string split on line feeds.
editor.recentDrafts property returns an array of recent drafts loaded in the editor, with the most recent previous draft as the first index. Useful for navigation in actions. Docs
app.openInNewWindow(draft) script method. (iPad/Mac). Pretty self explainatory I think. Docs
Scripting access to editor navigation markers, as displayed in the Navigation window/menu. Allows for the creation of actions that navigate within the current document. Docs
editor.navigationMarkers: An array of navigation markers available in the document. Docs
editor.navigationMarkerAfter(location: number) and editor.navigationMarkerBefore(location: number) convenience methods to get the next/previous navigation markers relative to a location in the text.
Example actions:
Previous Marker: Move cursor to the previous marker (Header, etc.) in the draft.
Next Marker: Move cursor to the next marker (Header, etc.) in the draft.
navigationMarkers are objects with the following properties:
location: start location of the range
length: length of the range
prefix: Identifying prefix for the marker (like H1, H2 in Markdown syntax) as defined by syntax
label: Identifying label for the marker.
level: indentation level of the marker.
FileManager has new getCreationDate(path), getModificationDate(path), and setCreationDate(path, date) and setModificationDate(path, date) functions. Docs
File action step has a new “Maintain dates” option which will set the creation/modification date of the newly created file to match those of the current draft. When the action creates a new file, creation and modification will be set - if it is appending/prepending, only modification date will be updated. Docs
Add the option to copy title to the clipboard in locations where there are copy options.
Contextual menus on drafts in Quick Search results.
Other Changes and Updates
Fix: Better routing of URLs in multiple windows to support new links better.
Change: Add horizontal rule match to Markdown syntax definitions (***, —).
Fix: Editing templates in actions should default to smart quote/dashes disabled.
Change: Audited reserved keyboard shortcut list to include some additional shortcuts that create conflicts on Mac.
New: Drafts in quick search results have contextual menus with common commands.
Change: Allow previews to open non-http links.
Fix: Submitting invalid data to FileManager.writeJSON could crash the app.
Fix: State of options in the main menu Editor menu not always correct when viewing drafts in secondary windows.
Fix: Crash clicking in empty space in manage actions window.
Fix: Editing templates in actions should default to smart quote/dashes disabled.
New: Context menu in drafts in the draft list and quick search add “Open in New Window” option.
Fix: Specifying locale when calling editor.dictate() did not set the requested locale properly.
Fix: Clipping issue in editor preferences.
Fix: Change the current draft’s syntax in a script would not update syntax selection dropdown menu.
Fix: Better handling of empty state in arrange mode.
Change: Add command-L keyboard shortcut for “Find in List”
Change: Opening a draft via /open URL should restore the last selected position in the draft.
/open URL scheme now supports additional “title” and “allowCreate” parameters that allow drafts to be found and opened by title - and, optionally created as a new draft if a matching title is not found.
Arrange mode now supports expand/collapse modes like iOS version.
Fix: “Export” action step should only add .txt file extension if the filename template did not already provide an extension.
Change: Make {== highlight ==} CriticMarkup syntax in MultiMarkdown more prominent.