HomeGuidesAPI Reference
Submit Documentation FeedbackJoin Developer CommunityOptimizely GitHubOptimizely NuGetLog In

Editor Definitions

This topic explains configuring editing of all properties of a certain property dataType and uiHint.

The data type and UI hint together forms a key that is used to select an editor widget for all properties that share the same key. Omitting UI hint (or leaving it blank) applies the setting to properties of that data type that do not have an UI hint and thereby overriding the default editors provided out-of-the-box.

The editor property points to a client-side widget that can edit a specific type.

Create Editor Definition

Create a new editor definition.

POST/api/episerver/v3.0/editors

You can also provide custom settings that are available to the editor widget. Example:

{
  "dataType": "PropertyString",
  "uiHint": "stringList",
  "editor": "clientResources/scripts/editors/StringList",
  "customSetting1": true,
  "customSetting2": "Place items on separate lines"
}

Selections

This is a special setting used to provide a list of selection items for a specific property. This works in the same way as single or multiple list options.

{
  "dataType"   : "PropertyString",
  "uiHint"     : "weekdays",
  "editor"     : "epi-cms/contentediting/editors/CheckBoxListEditor",
  "selections" :
  {
    "Monday"    : "MON",
    "Wednesday" : "WEN",
    "Friday"    : "FRI"
  }
}
{
  "dataType"   : "PropertyString",
  "uiHint"     : "color",
  "editor"     : "epi-cms/contentediting/editors/SelectionEditor",
  "selections" :
  {
    "Red"   : "R",
    "Green" : "G",
    "Blue"  : "B"
  }
}

Update (or Create) Editor Definition

Updates an existing editor definition or creates a new one. Also known as upsert.

PUT/api/episerver/v3.0/editors/{dataType}/{uiHint}

List Editor Definitions

List all editor definitions.

GET/api/episerver/v3.0/editors

Get Editor Definition

Get an editor definition identified by a data type and UI hint (optional).

GET/api/episerver/v3.0/editors/{dataType}/{uiHint}

Remove Editor Definition

Delete an editor definition identified by a data type and UI hint (optional).

DELETE/api/episerver/v3.0/editors/{dataType}/{uiHint}