Attributes & connectors

Attributes are declared in two places: globally under the top-level attributes key (offered on every element) and per element under an entry's own attributes.

Attribute definitions

Each attribute maps its name to a definition:

"rend": {
  "type": "string",          // value type
  "default": "i",            // optional default value
  "enum": ["i", "b", "u", "code"]  // optional fixed set of allowed values
}
Property Meaning
type The value type (string).
default Value applied when the element is created without an explicit value.
enum Restricts the value to a fixed list (rendered as a dropdown in the sidebar).
connector Turns the attribute into an authority-lookup field. See below.

Global attributes

Declared once and available on every element:

AttributeType
rend string
id string

Connectors

A connector on an attribute wires it to an authority service: instead of typing a raw value, the editor shows a search panel and stores the chosen entry's identifier.

"persName": {
  "type": "inline",
  "attributes": {
    "key": {
      "type": "string",
      "connector": { "name": "GND", "type": "person", "prefix": "gnd" }
    }
  }
}
Property Meaning
name The authority provider: GND, GeoNames, Airtable, … — or Asset for the built-in image picker
type The record type to search (e.g. person, organization, place, term), or image for assets
prefix Prefix prepended to the stored identifier (e.g. gndgnd-118774352).
user Provider-specific account/user, where required (e.g. GeoNames).

Asset is a built-in connector (no pb-components needed). On graphic.url / graphic xlink:href it keeps the URL field editable (relative path or absolute http(s): URL) and, when editor.assets is set, adds a thumbnail grid and upload zone for stored images.

Providers such as Airtable take additional configuration (base, api-key, table, fields, filter, …) forwarded to the underlying pb-authority element.

Elements with connectors in the TEI schema

The built-in TEI schema (src/tei-schema.json) wires authority lookups on these elements. The JATS schema does not define connectors out of the box.