Craft Create (URL Scheme) Drafts Action
Updated 11102022-175952
craftdocs://createdocument?spaceId=a25fbb2VopyLtegVgh7g53b&title=Test&content=This%20is%20a%20test&folderId=
Description
Directory Description
JS
Install
Craft URL Scheme
Using URL Scheme
Ulysses
Craft URL Scheme
The URL scheme lets users and developers of other apps send commands to Craft. This page explain how it works and what are the current capabilities.
Note: We are planning to add more capabilities to the existing ones in the future.
Here are the available commands that Craft understands:
- Open a document
- Create a document
- Append to an existing document
- Start search in a Space
Open page
Inputs:
- blockId - you can access it if you click on Copy Deeplink in a doc, the link has a blockId parameter
- spaceId - your user id usually (random guid), if it's a shared workspace, you need to get it [click copy deeplink, it will have the id]
Example: craftdocs://open?spaceId=&blockId=
Note: It does not work when you are not the member of the space
Open space
Inputs:
- spaceId - you can get this from a simple deeplink, when clicking on Copy Deeplink
- (optional) tab - calendar or search or documents
Example: craftdocs://openspace?spaceId=&tab=
Note: It does not work when you are not the member of the space
Create document
Inputs:
- spaceId - you can get this from a simple deeplink, when clicking on Copy Deeplink
- content - Percentage encoded markdown (images not supported yet)
- title - Percentage encoded plaintext title
- folderId - Parameter is required, but can be empty
Example: craftdocs://createdocument?spaceId=&title=&content=&folderId=
Append to doc
Inputs:
- spaceId - you can get this from a simple deeplink, when clicking on Copy Deeplink
- index - index of new block (0 for prepend, huge number for append (more blocks than what you have in your doc)
- parentBlockId - blockId of document
- content - percentage encoded string
Example: craftdocs://createblock?parentBlockId=&spaceId=&content=&index=
Search in Workspace
Starts a search in a given workspace and prefills search textfield with the query contents
Inputs:
- spaceId - you can get this from a simple deeplink, when clicking on Copy Deeplink
- query - Make sure it's percentage encoded
Example: craftdocs://opensearch?spaceId=&query=
Access to Daily Notes
Yesterday - craftdocs://openByQuery?query=yesterday&spaceId=
Today - craftdocs://openByQuery?query=today&spaceId=
Tomorrow - craftdocs://openByQuery?query=tomorrow&spaceId=