Kendo UI serialization TagHelper EditorSerializationSettingsTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[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:
Inherited Members
Example:
@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.
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.
public string Custom { get; set; }
Indicates whether the characters outside the ASCII range will be encoded as HTML entities. By default, they are encoded.
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).
public bool? OptimizeTags { get; set; }
Indicates whether inline scripts will be serialized and posted to the server.
public bool? Scripts { get; set; }
Methods
Adds the current TagHelper instance to its parent TagHelper.
protected override void AddSelfToParent(TagHelperContext context)
The TagHelper context.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.