Editor attribute reference
The editor reads data-* attributes on the elements your template produces — it never parses your markup. An attribute on an ancestor element declares, tag-agnostically, what a piece of DOM is in contract terms: which node and property it binds to, its atom type, its position, its state.
The golden rule: these attributes are emitted by helpers, never written by hand. Use the_prop/the_value/the_list/the_list_item/block/form, and the right attributes appear. The tables below are for understanding and debugging the output, not for hand-authoring it.
Node identity and state — data-node-*
Emitted on a node’s root element by block() and form().
| Attribute | Where | Value |
|---|---|---|
data-node-id | node root | the node’s @id |
data-node-type | node root | schema type, e.g. Place |
data-node-is-live | node root | "true" / "false" |
data-node-is-draft | node root | "true" / "false" |
data-node-selected | node root | set at runtime by the node bar (JS only, not emitted by PHP) |
Markers
Self-describing wrapper markers (no prefix).
| Attribute | Where | Meaning |
|---|---|---|
data-block | block wrapper | the block template slug |
data-menu | menu wrapper | menu marker |
data-form | form wrapper | the form template slug |
data-add-item / data-add-label | UI | “add item” hook and its label |
Inline editing — data-inline-*
Emitted by get_prop() (and its wrappers the_prop/the_value/the_richtext).
| Attribute | Where | Value |
|---|---|---|
data-inline-name | inline element | dot-path including prefix, e.g. containedInPlace.name |
data-inline-type | inline element | the atom type (see below) |
data-inline-value | inline element | current value (arrays as JSON) |
data-inline-dirty | inline element | "true" / "false" — whether it’s in the diff |
data-inline-focus | image element | focus point for object-position (set manually) |
data-inline-drop | image element | "true" to accept drag-and-drop upload (set manually) |
Atom types. The registered inline types are text, name, image, gallery, geo, identifier, and itemlist, with richtext for structured prose. The type is usually guessed from the property name; override it with the edit-type option on the helper.
In development: richtext and gallery are live in the code but still settling, and further atoms (heading, quote, code, embed, video, audio, a standalone link) are planned. Treat the atom set as growing.
Lists — data-list-*
The container carries data-inline-type="itemlist" plus the list attributes; items carry their own.
| Attribute | Where | Value |
|---|---|---|
data-list-type | <ol> | schema type of the items, e.g. Place |
data-list-orientation | <ol> | vertical (default) / horizontal |
data-list-fields | <ol> | JSON field spec for the list-item dialog |
data-list-item-index | <li> | integer position |
data-list-item-draggable | <li> | "true" (editors only) |
Framework init flags — data-ctxr-*
JS-only guards that prevent double-binding (data-ctxr-init, data-ctxr-block-init, etc.). Kept deliberately separate from the PWA world so a data-ctxr-* sweep never touches PWA attributes.
UI controls and space-owned attributes
Local hooks with no platform meaning — data-action, data-save, data-dialog, data-scope, and so on — live in editor and management modules. Your own templates are free to use any other data-* attributes (e.g. data-map-*); the platform won’t touch them. The Router sets data-path, data-type and data-id on <body>.
PWA surface — data-pwa-*
Progressive-enhancement hooks read by the PWA brokers on live pages. Markup is hidden by default and revealed once the broker wires it, so a page stays clean without JavaScript.
| Attribute | Where | Meaning |
|---|---|---|
data-pwa-geo | container | holds distance-sortable geo items |
data-pwa-lat / data-pwa-lng | item | coordinates (items without sort last) |
data-pwa-name | item | optional label (else the first heading) |
data-pwa-distance | slot in item | where the distance label is written |
data-pwa-near | button | “sort by distance” |
data-pwa-notify | button | “alert me nearby” (proximity) |
data-pwa-perms | button | opens the central permission modal (location + notifications in one gesture) |
data-pwa-active | container | set after sorting |
The source of truth for these conventions is the platform’s internal attribute register; this page is the public, developer-facing slice of it. If an attribute here doesn’t behave as described in your space, the code is ahead of the docs — tell us.