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

Defines the fluent API for configuring the EditorImmutablesSettings settings.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class EditorImmutablesSettingsBuilder

Inheritance: objectEditorImmutablesSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public EditorImmutablesSettingsBuilder(EditorImmutablesSettings settings)
Parameters:settingsEditorImmutablesSettings

Methods

Defines a callback that allows custom deserialization of an immutable element. The callback accepts two arguments. The DOM element representing the immutable element in the html view and the immutable DOM element, which will be restored.

C#
public EditorImmutablesSettingsBuilder Deserialization(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorImmutablesSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Immutables(immutables =&gt;
immutables.Deserialization(@&lt;text&gt;
function(node, immutable) {
immutable.style.backgroundColor = "red";
}
&lt;/text&gt;)
)
)

Defines a callback that allows custom deserialization of an immutable element. The callback accepts two arguments. The DOM element representing the immutable element in the html view and the immutable DOM element, which will be restored.

C#
public EditorImmutablesSettingsBuilder Deserialization(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

EditorImmutablesSettingsBuilder

Example:
C#
@(Html.Kendo().Editor()
.Name("Editor")
.Immutables(immutables =&gt;
immutables.Deserialization("immutablesDeserialization");
)
)
&lt;script&gt;
function immutablesDeserialization(node, immutable) {
immutable.style.backgroundColor = "red";
}
&lt;/script&gt;

Kendo template or a callback that allows custom serialization of an immutable element. The callback accepts DOM element as only parameter and is expected to return the HTML source of a DOM element.

C#
public EditorImmutablesSettingsBuilder Serialization(string value)
Parameters:valuestring

The value that configures the serialization.

Returns:

EditorImmutablesSettingsBuilder

Example:
C#
@(Html.Kendo().Editor()
.Name("Editor")
.Immutables(immutables =&gt;
immutables.Serialization("&lt;#= data.nodeName # data=\"immutable-element\"&gt;&lt;/#= data.nodeName #&gt;");
)
)

Defines a callback that allows custom serialization of an immutable element. The callback accepts DOM element as only parameter and is expected to return the HTML source of a DOM element.

C#
public EditorImmutablesSettingsBuilder SerializationHandler(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorImmutablesSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Immutables(immutables =&gt;
immutables.SerializationHandler(@&lt;text&gt;
function(node) {
var tagName = node.tagName;
return "&lt;" + tagName + "&gt;" + &lt;/" + tagName + "&gt;";
}
&lt;/text&gt;)
)
)

Defines a callback that allows custom serialization of an immutable element. The callback accepts DOM element as only parameter and is expected to return the HTML source of a DOM element.

C#
public EditorImmutablesSettingsBuilder SerializationHandler(string handler)
Parameters:handlerstring

The name of the JavaScript function that will be evaluated.

Returns:

EditorImmutablesSettingsBuilder

Example:
C#
@(Html.Kendo().Editor()
.Name("Editor")
.Immutables(immutables =&gt;
immutables.SerializationHandler("immutablesSerialization");
)
)
&lt;script&gt;
function immutablesSerialization(node) {
var tagName = node.tagName;
return "&lt;" + tagName + "&gt;" + &lt;/" + tagName + "&gt;";
}
&lt;/script&gt;