Textastic
Textastic is a powerful text editor for iOS, iPadOS, and macOS with syntax highlighting for over 80 programming and markup languages. Protocol Launcher allows you to generate deep links to open, create, and edit files in Textastic.
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
ts
import { open } from 'protocol-launcher/textastic'
const url = open()Open File
ts
import { openFile } from 'protocol-launcher/textastic'
const url = openFile({
path: 'example.com',
name: 'index.html',
})New File
ts
import { newFile } from 'protocol-launcher/textastic'
const url = newFile({
name: 'foo.txt',
text: 'bar',
})Append Text
ts
import { append } from 'protocol-launcher/textastic'
const url = append({
location: 'iCloud',
name: 'clipboard.txt',
})Replace Text
ts
import { replace } from 'protocol-launcher/textastic'
const url = replace({
location: 'iCloud',
name: 'scratchpad.txt',
text: 'foo',
})Reload Customizations
ts
import { reloadCustomizations } from 'protocol-launcher/textastic'
const url = reloadCustomizations()