URL Scheme

1Writer registers the onewriter:// URL scheme and supports for integration with other apps via the x-callback-url protocol. The format for a URL action looks like this:

onewriter://x-callback-url/[action]?[action parameters]&[x-callback parameters]

Supported x-callback parameters: x-success, x-error and x-cancel.

/create

Create a new document.

Parameters

  • path optional The path to the folder in which you want to create the document.
  • name optional The name for the document.
  • text optional The content for the document. If not specified, the content of the clipboard will be used.

Usage Examples

  • onewriter://x-callback-url/create?path=Dropbox%2FDocuments&name=Notes.txt&text=Hello%20world

    Create a new document with name Notes.txt in the folder Dropbox/Documents, its content is Hello world.

  • onewriter://x-callback-url/create?path=iCloud%2FWork

    Create a new document in the folder iCloud/Work, its content is get from the clipboard.

/replace

Replace content of a document.

Parameters

  • path optional The path to the document.
  • text optional The new content for the document. If not specified, the content of the clipboard will be used.

Usage Examples

  • onewriter://x-callback-url/replace?path=Dropbox%2FDocuments%2FNotes.txt&text=Hello%20world

    Replace content of the document at Dropbox/Documents/Notes.txt with new content: Hello world.

  • onewriter://x-callback-url/replace?path=iCloud%2FWork%2FActions.txt

    Replace content of the document at iCloud/Work/Actions.txt with the content of the clipboard.

/replace-selection

Replace selected text in the current editing document.

Parameters

  • text required The replacement text.

/content

Return content of a document.

Parameters

  • path optional The path to the document.
  • param optional The content will be passed to the x-success URL using this parameter name. Default value is text.

Usage Examples

  • onewriter://x-callback-url/content?path=Dropbox%2FDocuments%2FNotes.txt

    Return content of the document at Dropbox/Documents/Notes.txt.

  • onewriter://x-callback-url/content?path=iCloud%2FWork%2FActions.txt

    Return content of the document at iCloud/Work/Actions.txt.

/create-todo

Create a to-do list by separating lines of the text parameter. You can start a line with "+" to indicate a completed todo.

Parameters

  • path optional The path to the folder in which you want to create the document.
  • name optional The name for the document.
  • text optional The content for the document. If not specified, the content of the clipboard will be used.

Usage Examples

  • onewriter://x-callback-url/create-todo?path=Dropbox%2FShopping&text=Milk%0AEggs%0AChocolate

    Create a new to-do list in the folder Dropbox/Shopping, its items are Milk, Eggs and Chocolate.

/open

Open an existing document.

Parameters

  • path optional The path to the document.

Usage Examples

  • onewriter://x-callback-url/open?path=Dropbox%2FDocuments%2FNotes.txt

    Open the document at Dropbox/Documents/Notes.txt

/append

Append content to an existing document.

Parameters

  • path optional The path to the document.
  • text optional The content to append. If not specified, the content of the clipboard will be used.

Usage Examples

  • onewriter://x-callback-url/append?path=Dropbox%2FDocuments%2FNotes.txt&text=Hello%20world

    Append Hello world to the document at Dropbox/Documents/Notes.txt

/prepend

Prepend content to an existing document.

Parameters

  • path optional The path to the document.
  • text optional The content to prepend. If not specified, the content of the clipboard will be used.

Usage Examples

  • onewriter://x-callback-url/prepend?path=Dropbox%2FDocuments%2FNotes.txt&text=Hello%20world

    Prepend Hello world to the document at Dropbox/Documents/Notes.txt