Link Search Menu Expand Document

Scripting

Table of Contents

  1. Basics
  2. Scripting Reference

Basics

Drafts includes a complete JavaScript runtime based on JavaScriptCore. Scripts are executed by including script action step in actions.

The JavaScript implementation is compatible with ECMAScript 6, and supports all general JavaScript language libraries for working with basic datatypes, such as strings, numbers, dates, arrays, and objects. The runtime is not a browser-based runtime, and does not contain DOM scripting capabilities.

Scripting Reference

Draft extends the script runtime with several custom objects and functions specific to working with Drafts and the underlying OS. These include tools to create, query and manipulate your drafts, work with the editor to manipulate text, call out to web services, and more. Visit the script reference site for complete documentation of objects available, and example scripts.


© 2012-2023 by Agile Tortoise, Inc.
Drafts is a registered Trademark of Agile Tortoise, Inc.
Privacy | Terms

Mastodon