EditorDeserializationSettingsBuilder
Methods
Custom(System.Func)
Callback that allows custom deserialization to be plugged in. The method accepts string as the only parameter and is expected to return the modified content as string as well.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
Example
@( Html.Kendo().Editor()
.Name("Editor")
.Deserialization(d => d.Custom(@<text>
function(html) {
return html.replace(/(#)/, ",");
}
</text>)
)
)
Custom(System.String)
Callback that allows custom deserialization to be plugged in. The method accepts string as the only parameter and is expected to return the modified content as string as well.
Parameters
handler - System.String
The name of the JavaScript function that will be evaluated.
Example
@( Html.Kendo().Editor()
.Name("Editor")
.Deserialization(d => d.Custom("htmlDeserialization"))
)
<script>
function htmlDeserialization(html) {
return html.replace(/(<\/?)b(\s?)/, "$1strong$2");
}
</script>