Table of Contents

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

Type

Disabled

Gets or sets is editor disabled.

public bool Disabled { get; set; }

Property Value

bool

Key

Gets or sets the key that uniquely identifies this editor instance.

public string Key { get; set; }

Property Value

string

Validators

Gets or sets the list of editor validators.

public virtual ValidatorCollection Validators { get; }

Property Value

ValidatorCollection

ValueConverter

Gets the value converter for converting values from and to string representation.

protected virtual ValueConverter ValueConverter { get; }

Property Value

ValueConverter

Methods

GetEditorType(ItemField)

Returns type of item editor

public static Type GetEditorType(ItemField field)

Parameters

field ItemField

Item 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

object

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

value object
field ItemField

Returns

object

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 EditorRenderingContext

Editor rendering context.

StringifyValue(object)

Returns the string representation of value.

public virtual string StringifyValue(object value)

Parameters

value object

Object

Returns

string

See Also

To top