Class TextOnlyValueEditor
Custom value editor which ensures that the value stored is just plain text and that no magic json formatting occurs when translating it to and from the database values
Namespace: Umbraco.Web.PropertyEditors
Assembly: Umbraco.Web.dll
Syntax
public class TextOnlyValueEditor : DataValueEditor, IDataValueEditor
Constructors
View SourceTextOnlyValueEditor(DataEditorAttribute)
Declaration
public TextOnlyValueEditor(DataEditorAttribute attribute)
Parameters
Type | Name | Description |
---|---|---|
DataEditorAttribute | attribute |
Methods
View SourceToEditor(Property, IDataTypeService, String, String)
A method used to format the database value to a value that can be used by the editor
Declaration
public override object ToEditor(Property property, IDataTypeService dataTypeService, string culture = null, string segment = null)
Parameters
Type | Name | Description |
---|---|---|
Property | property | |
IDataTypeService | dataTypeService | |
System.String | culture | |
System.String | segment |
Returns
Type | Description |
---|---|
System.Object |
Remarks
The object returned will always be a string and if the database type is not a valid string type an exception is thrown