Search Results for

    Show / Hide Table of Contents
    View Source

    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

    Inheritance
    System.Object
    DataValueEditor
    Namespace: Umbraco.Cms.Core.PropertyEditors
    Assembly: Umbraco.Core.dll
    Syntax
    public class TextOnlyValueEditor : DataValueEditor, IDataValueEditor

    Constructors

    View Source

    TextOnlyValueEditor(DataEditorAttribute, ILocalizedTextService, IShortStringHelper, IJsonSerializer, IIOHelper)

    Declaration
    public TextOnlyValueEditor(DataEditorAttribute attribute, ILocalizedTextService localizedTextService, IShortStringHelper shortStringHelper, IJsonSerializer jsonSerializer, IIOHelper ioHelper)
    Parameters
    Type Name Description
    DataEditorAttribute attribute
    ILocalizedTextService localizedTextService
    IShortStringHelper shortStringHelper
    IJsonSerializer jsonSerializer
    IIOHelper ioHelper

    Methods

    View Source

    ToEditor(IProperty, 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(IProperty property, string culture = null, string segment = null)
    Parameters
    Type Name Description
    IProperty property
    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

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • TextOnlyValueEditor(DataEditorAttribute, ILocalizedTextService, IShortStringHelper, IJsonSerializer, IIOHelper)
    • Methods
      • ToEditor(IProperty, String, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX