Built-in Editor Types

Defining editors

Editors are defined using attributes on content item classes or properties.

  • WithEditableChild – Adds an edit for form a child item resolved by its name
  • WithEditableDateRange – Adds a date range editor
  • WithEditableName – Adds editing of the item’s name (url segment)
  • WithEditablePublishedRange – Adds editing of the items publishing range
  • WithEditableTitle – Adds editing of the item title
  • EditableCheckBox – Adds editing of a Boolean property
  • EditableChildren – Adds editing of a collection of children
  • EditableDate – Adds editing of a date
  • EditableEnum – Adds editing of an enum
  • EditableFileUpload – Adds file upload and store a link to the uploaded file
  • EditableFreeTextArea – Adds a WYSIWYG editor
  • EditableImage – Adds an image picker
  • EditableImageSize – Adds an image size drop down
  • EditableItem – Adds an editable child item
  • EditableLanguagesDropDown – Adds a drop down with languages
  • EditableLink – Adds a link picker
  • EditableTextBox – Adds a text box
  • EditableUrl – Adds an text box with link picker
  • EditableUserControl – Adds a custom user control

This is an example of a content item with too many editors defined (you should define no more than one editor per property).

[WithEditableChild]
[WithEditableDateRange]
[WithEditableName]
[WithEditablePublishedRange]
[WithEditableTitle]
public abstract class ContentPageBase : ContentItem
{
     /* only define _one_ of the following... */
     [EditableCheckBox]
     [EditableChildren]
     [EditableDate]
     [EditableEnum]
     [EditableFileUpload]
     [EditableFreeTextArea]
     [EditableImage]
     [EditableImageSize]
     [EditableItem]
     [EditableLanguagesDropDown]
     [EditableLink]
     [EditableTextBox]
     [EditableUrl]
     [EditableUserControl]
     public virtual string Text { get; set; }
}