HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Editor definitions

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

The dataType and uiHint together forms a key to select an editor widget for 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 overriding the default editors.

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

Create editor definition

Create an 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 one. They are also known as upsert.

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

List editor definitions

List 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}