onFocus so your app can run custom logic (navigation, uploads, deep links, etc.).
Decorator model
Each decorator is a clickable element in the form with optional presentation fields and a requiredaction string used as the event identifier.
| Property | Type | Description |
|---|---|---|
action | String | Required for programmatic add/update. Non-empty; must be unique among decorators at the same path. |
icon | String? | Icon name (see Supported icons). |
label | String? | Text shown next to or instead of the icon. |
color | String? | If set, must be a 6-digit hex color: #RRGGBB (e.g. #3B82F6). |
icon or label (isDisplayable).
Paths
DocumentEditor resolves decorators using a slash-separated path:
| Segments | Scope |
|---|---|
pageId/fieldPositionId | Field header decorators |
pageId/fieldPositionId/rowId | Row decorators (tables and collections) |
pageId/fieldPositionId/rowId/columnId | Column decorators |
API
Paths usepageId, fieldPositionId, and for tables/collections rowId and columnId from your document. Replace the placeholders below with real ids from Page, FieldPosition, and the field’s row/column model.
Field decorators (two segments)
Row decorators (three segments)
Row decorators apply to a specific row in a table or collection. The path ispageId/fieldPositionId/rowId.
Column decorators (four segments)
Column decorators apply to a column in the context of a row (table or collection). The path ispageId/fieldPositionId/rowId/columnId.
action, missing decorator to remove/update) are reported through onError as JoyfillError.decoratorError(DecoratorError).
Collection fields: Adding or changing decorators on collection fields requires a license that enables collection features. Otherwise the SDK emits a decorator error and does not apply the change.
Handling taps
Decorator taps are not separate callbacks. They are delivered ononFocus with a field event whose type and target are set to the decorator’s action. Use the same handler as normal field focus, and branch on field.type / field.target when needed.
For row or column scope, rowIds, columnId, and parentPath may be set on FieldIdentifier so you know where the user tapped.
onFocus / onBlur flow.
Supported icons
The SDK maps common names to bundled artwork or SF Symbols, including:camera, import, paperclip, image, file, comment, comments, upload, download, rotate, cloud, filter, share, paper-plane, folder, folder-open, magnet, eye, circle-info, add, plus, print, flag. Unknown names fall back to a default symbol.