Context Reference

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.

Example

The following context exposes a value and a function:

Copy

Context item fields

A context item supports the following fields:

FieldRequiredDescription
dataTypeYesType of value or function that the item exposes.
displayNameNoItem name shown in the editor.
arrayItemsWhen dataType is arrayItemsDefinition for each element in an array.
dataWhen dataType is dataFields in a nested object.
functionWhen dataType is functionParameters and return type of a function.
textEnumWhen dataType is textEnumAllowed string options.

Arrays

For an array, set dataType to arrayItems and define each element under arrayItems.item:

Copy

Warning: Arrays in context use arrayItems.item. Arrays in data use arrayItems.dataItem.

Nested objects

For a nested object, set dataType to data and define its fields under data.items:

Copy

Text enums

For a fixed set of strings, set dataType to textEnum and list the choices under textEnum.options:

Copy

Functions

For a function, set dataType to function and describe its signature under function.

FieldRequiredDescription
parametersNoUp to 10 parameter definitions. Omit this field for a function with no parameters.
returnsNoReturn type definition. Omit this field for a function with no response.
asyncNoWhether the function returns a Promise. Defaults to false.
displayNameNoFunction name shown in the editor.
descriptionNoFunction description shown in the editor.

For example, the following function takes an ID and an optional quantity:

Copy

Parameter fields

Each function parameter supports the following fields:

FieldRequiredDescription
dataTypeYesType of value the parameter accepts.
displayNameNoParameter name shown in the editor.
descriptionNoParameter description shown in the editor.
optionalNoWhether the parameter is optional. Only trailing parameters can be optional.
defaultValueNoDefault shown in the editor when optional is true. The provider code must handle a missing value.
arrayItemsWhen dataType is arrayItemsDefinition for each array element.
dataWhen dataType is dataFields in a nested object.
textEnumWhen dataType is textEnumAllowed string options.

Rich text

Many Wix elements accept rich text through editor binding. To expose formatted text, set dataType to richText and provide a RichText object at runtime:

Copy

For the runtime shape, see Context Provider Data Types.

See also

Last updated: 2 November 2026

Did this help?