New to Telerik UI for ASP.NET MVC? Download free 30-day trial

EditorSerializationSettingsBuilder

Methods

Custom(System.Func)

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

Parameters

handler - System.Func<Object,Object>

The value that configures the custom action.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Serialization(d => d.Custom(@<text>
                    function(html) {
                        return html.replace(/(#)/, ",");
                    }
                    </text>)
                )
             )

Custom(System.String)

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

Parameters

handler - System.String

The value that configures the custom action.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Serialization(d => d.Custom("htmlSerialization"))
             )
             <script>
                function htmlSerialization(html) {
                    return html.replace(/(<\/?)b(\s?)/, "$1strong$2");
                }
             </script>

Entities(System.Boolean)

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

Parameters

value - System.Boolean

The value that configures the entities.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Serialization(d => d.Entities(true))
             )

OptimizeTags(System.Boolean)

Indicates whether optizable tags (e.g. span and font elements with no attributes) should be removed from the DOM.

Parameters

value - System.Boolean

The value that configures the optimizeTags.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Serialization(d => d.OptimizeTags(true))
             )

Scripts(System.Boolean)

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

Parameters

value - System.Boolean

The value that configures the scripts.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Serialization(d => d.Scripts(true))
             )

Semantic(System.Boolean)

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. Default: true.

Parameters

value - System.Boolean

The value that configures the semantic.

Example


             @( Html.Kendo().Editor()
                .Name("Editor")
                .Serialization(d => d.Semantic(false))
             )

In this article
Not finding the help you need?