Skip to content

Coda ​

Coda (now known as Code Editor) is a portable code editor for iOS, perfect for quick web edits on the go. Protocol Launcher allows you to generate deep links to create and edit files in Coda.

Usage ​

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Open App ​

On-Demand
ts
import { open } from 'protocol-launcher/coda'

const url = open()

New File ​

Creates a new file in Coda. If one exists, a file with a unique name will be created.

On-Demand
ts
import { newFile } from 'protocol-launcher/coda'

const url = newFile({
  name: 'foo.txt',
  text: 'bar',
})

Append ​

Append text to a file in Coda, creating it if necessary.

On-Demand
ts
import { append } from 'protocol-launcher/coda'

const url = append({
  name: 'foo.txt',
  text: 'bar',
})

Replace ​

Replaces the contents of a file in Coda, creating it if necessary.

On-Demand
ts
import { replace } from 'protocol-launcher/coda'

const url = replace({
  name: 'foo.txt',
  text: 'bar',
})