Class EditorDescriptor
Used for holding registered client side editors in the MetadataHandlerRegistry
Inheritance
Inherited Members
Namespace: EPiServer.Shell.ObjectEditing.EditorDescriptors
Assembly: EPiServer.Shell.dll
Version: 10.10.4Syntax
public class EditorDescriptor : IMetadataExtender, IMetadataHandler
Constructors
EditorDescriptor()
Initializes a new instance of the EditorDescriptor class.
Declaration
public EditorDescriptor()
Properties
AllowedTypes
Gets or sets the allowed types.
Declaration
public IEnumerable<Type> AllowedTypes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Type> | The allowed types. |
Remarks
This is used for setting dnd types to determine what can be dropped on an editor or overlay.
AllowedTypesFormatSuffix
Gets or sets the specific format suffix if any. For instance "reference" or "light" for different content formats.
Declaration
public string AllowedTypesFormatSuffix { get; set; }
Property Value
Type | Description |
---|---|
System.String | The allowed types format suffix. |
ClientEditingClass
Gets or sets the client editing class, usually a DOJO widget.
Declaration
public string ClientEditingClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client editing class. |
ClientEditingPackage
Gets or sets the client editing class package, which needs to be required, usually a dojo package. Leave it empty if package name is the same to class name.
Declaration
public string ClientEditingPackage { get; set; }
Property Value
Type | Description |
---|---|
System.String | The client editing class package. |
DefaultValue
Gets or sets the default binding value.
Declaration
public virtual object DefaultValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default binding value. |
DndSourcePropertyName
Gets or sets the name of the inner property to extract data from in an drag and drop operation.
Declaration
public string DndSourcePropertyName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the inner property to extract for drag and drop operations. |
Remarks
For instance, you can set url to extract the url property from a link object.
DndTargetPropertyName
Gets or sets the name of the child property that should accept drag and drop operations to the overlay.
Declaration
public string DndTargetPropertyName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the child property that can accept drag and drop for the overlay. |
EditorConfiguration
Gets or sets the editor configuration. This will be passed to the editor class's constructor
Declaration
public IDictionary<string, object> EditorConfiguration { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | The editor configuration. |
LayoutClass
Gets or sets the layout class.
Declaration
public string LayoutClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The layout class. |
OverlayConfiguration
Gets or sets the configuration data for the overlay. This will be passed to the overlay class's contructor
Declaration
public IDictionary<string, object> OverlayConfiguration { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | The overlay configuraion. |
SelectionFactoryType
Gets or sets the type of the selection factory.
Declaration
public Type SelectionFactoryType { get; set; }
Property Value
Type | Description |
---|---|
System.Type | The type of the selection factory. |
Methods
ModifyMetadata(ExtendedMetadata, IEnumerable<Attribute>)
Modifies the metadata, adding any custom data the client needs.
Declaration
public virtual void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
Parameters
Type | Name | Description |
---|---|---|
ExtendedMetadata | metadata | The metadata. |
System.Collections.Generic.IEnumerable<System.Attribute> | attributes | The custom attributes attached to the model class |
Remarks
This method should only be overriden when you need the entire metedata object to work with. Otherwise, metadata properties should be set by setting the corresponding properties in the editor concrete descriptors' constructor. Also be aware that modifying metadata object will overwrite all data annotation attributes used in model class.
SetEditorConfiguration(ExtendedMetadata)
Sets the initial configuration for the widget.
Declaration
protected virtual void SetEditorConfiguration(ExtendedMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
ExtendedMetadata | metadata | The metadata. |
SetOverlayConfiguration(ExtendedMetadata)
Sets the initial configuration for the widget.
Declaration
protected virtual void SetOverlayConfiguration(ExtendedMetadata metadata)
Parameters
Type | Name | Description |
---|---|---|
ExtendedMetadata | metadata | The metadata. |