HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback

Editor definitions

Explains configuring editing of all properties of a certain property dataType and uiHint.

The dataType and uiHint together forms a key that is used to select an editor widget for all properties that share the same key. Omitting uiHint (or leaving it blank) applies the setting to properties of that data type that do not have a uiHint 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 dataType and uiHint (optional).

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

Remove editor definition

Delete an editor definition identified by a dataType and uiHint (optional).

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