Class Editor
- Namespace
- Dynamicweb.Content.Items.Editors
- Assembly
- Dynamicweb.dll
Represents an item field editor.
public abstract class Editor : ConfigurableAddIn
- Inheritance
-
Editor
- Derived
- Inherited Members
Constructors
Editor()
Initializes a new instance of an object.
protected Editor()
Properties
DataType
Gets the data type for this editor.
public abstract Type DataType { get; }
Property Value
Disabled
Gets or sets is editor disabled.
public bool Disabled { get; set; }
Property Value
Key
Gets or sets the key that uniquely identifies this editor instance.
public string Key { get; set; }
Property Value
Validators
Gets or sets the list of editor validators.
public virtual ValidatorCollection Validators { get; }
Property Value
ValueConverter
Gets the value converter for converting values from and to string representation.
protected virtual ValueConverter ValueConverter { get; }
Property Value
Methods
GetEditorType(ItemField)
Returns type of item editor
public static Type GetEditorType(ItemField field)
Parameters
field
ItemFieldItem field with editor
Returns
- Type
Type of item editor
Remarks
Default returns TextEditor
GetViewModelValue(object)
Gets the value to use when rendering items in view models - GetValue(string)
public virtual object GetViewModelValue(object value)
Parameters
value
object
Returns
GetViewModelValue(object, ItemField)
Gets the value to use when rendering items in view models - GetValue(string)
public virtual object GetViewModelValue(object value, ItemField field)
Parameters
Returns
NewKey()
Returns a new unique key that can be used to identify editor instance.
public static string NewKey()
Returns
- string
A new unique key that can be used to identify editor instance.
RenderValue(EditorRenderingContext)
Renders value.
public virtual void RenderValue(EditorRenderingContext context)
Parameters
context
EditorRenderingContextEditor rendering context.
StringifyValue(object)
Returns the string representation of value.
public virtual string StringifyValue(object value)
Parameters
value
objectObject