New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Kendo UI serialization TagHelper EditorSerializationSettingsTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("serialization", ParentTag = "kendo-editor", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("serialization", ParentTag = "richtexteditor-editor", TagStructure = TagStructure.WithoutEndTag)]
[SuppressTagRendering]
public class EditorSerializationSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent

Inheritance: objectTagHelperTagHelperChildBaseEditorSerializationSettingsTagHelper

Implements: ITagHelperITagHelperComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

<kendo-editor name="editor">
    <serialization custom="myCustomSerializationFunction" />
</kendo-editor>

<script>
    function myCustomSerializationFunction(){
        //handler logic here
    }
</script>

Constructors

Initializes a new instance of the EditorSerializationSettingsTagHelper class.

C#
public EditorSerializationSettingsTagHelper()

Properties

Define custom serialization for the editable content. The method accepts a single parameter as a string and is expected to return a string.

C#
public string Custom { get; set; }

Indicates whether the characters outside the ASCII range will be encoded as HTML entities. By default, they are encoded.

C#
public bool? Entities { get; set; }

Indicates whether optizable tags should be removed from the DOM. Currently, optimizable tags are span and font elements with no attributes and no decoration or formatting applied (via inline styles/attributes).

C#
public bool? OptimizeTags { get; set; }

Indicates whether inline scripts will be serialized and posted to the server.

C#
public bool? Scripts { get; set; }

Indicates whether the font styles will be saved as semantic (strong / em / span) tags, or as presentational (b / i / u / font) tags. Used for outputting content for legacy systems.

C#
public bool? Semantic { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>