The context section of a context provider manifest declares the values and functions that the provider exposes through editor binding. It contains an items map where each key names an exposed item.
The following context exposes a value and a function:
A context item supports the following fields:
| Field | Required | Description |
|---|---|---|
dataType | Yes | Type of value or function that the item exposes. |
displayName | No | Item name shown in the editor. |
arrayItems | When dataType is arrayItems | Definition for each element in an array. |
data | When dataType is data | Fields in a nested object. |
function | When dataType is function | Parameters and return type of a function. |
textEnum | When dataType is textEnum | Allowed string options. |
For an array, set dataType to arrayItems and define each element under arrayItems.item:
Warning: Arrays in context use arrayItems.item. Arrays in data use arrayItems.dataItem.
For a nested object, set dataType to data and define its fields under data.items:
For a fixed set of strings, set dataType to textEnum and list the choices under textEnum.options:
For a function, set dataType to function and describe its signature under function.
| Field | Required | Description |
|---|---|---|
parameters | No | Up to 10 parameter definitions. Omit this field for a function with no parameters. |
returns | No | Return type definition. Omit this field for a function with no response. |
async | No | Whether the function returns a Promise. Defaults to false. |
displayName | No | Function name shown in the editor. |
description | No | Function description shown in the editor. |
For example, the following function takes an ID and an optional quantity:
Each function parameter supports the following fields:
| Field | Required | Description |
|---|---|---|
dataType | Yes | Type of value the parameter accepts. |
displayName | No | Parameter name shown in the editor. |
description | No | Parameter description shown in the editor. |
optional | No | Whether the parameter is optional. Only trailing parameters can be optional. |
defaultValue | No | Default shown in the editor when optional is true. The provider code must handle a missing value. |
arrayItems | When dataType is arrayItems | Definition for each array element. |
data | When dataType is data | Fields in a nested object. |
textEnum | When dataType is textEnum | Allowed string options. |
Many Wix elements accept rich text through editor binding. To expose formatted text, set dataType to richText and provide a RichText object at runtime:
For the runtime shape, see Context Provider Data Types.
Last updated: 2 November 2026