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

Defines the fluent API for configuring the Kendo UI Editor for ASP.NET MVC events.

Definition

Constructors

Initializes a new instance of the EditorEventBuilder class.

C#
public EditorEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

The Editor event handlers.

Methods

Defines the handler of the Change client-side event. Fires when Editor is blurred and its content has changed.

C#
public EditorEventBuilder Change(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Change(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Change client-side event. Fires when Editor is blurred and its content has changed.

C#
public EditorEventBuilder Change(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Change event.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Change("onChange")
)
)

Defines the handler of the Execute client-side event. Fires when an Editor command is executed.

C#
public EditorEventBuilder Execute(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Execute(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Execute client-side event. Fires when an Editor command is executed.

C#
public EditorEventBuilder Execute(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Execute event.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Execute("onExecute")
)
)

Defines the handler of the Keydown client-side event. Fires when the user depresses a keyboard key. Triggered multiple times if the user holds the key down.

C#
public EditorEventBuilder Keydown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Keydown(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Keydown client-side event. Fires when the user depresses a keyboard key. Triggered multiple times if the user holds the key down.

C#
public EditorEventBuilder Keydown(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Keydown event.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Keydown("onKeydown")
)
)

Defines the handler of the Keyup client-side event. Fires when the user releases a keyboard key.

C#
public EditorEventBuilder Keyup(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Keyup(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Keyup client-side event. Fires when the user releases a keyboard key.

C#
public EditorEventBuilder Keyup(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Keyup event.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Keyup("onKeyup")
)
)

Defines the handler of the Paste client-side event. Fires before the content is pasted in the Editor.

C#
public EditorEventBuilder Paste(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Paste(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Paste client-side event. Fires before the content is pasted in the Editor.

C#
public EditorEventBuilder Paste(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Paste event.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Paste("onPaste")
)
)

Defines the handler of the PdfExport client-side event. Fired when the user clicks the "Export to PDF" toolbar button.

C#
public EditorEventBuilder PdfExport(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.PdfExport(@&lt;text&gt;
function(ev) {
console.log(ev);
}
&lt;/text&gt;)
)
)

Defines the handler of the PdfExport client-side event. Fired when the user clicks the "Export to PDF" toolbar button.

C#
public EditorEventBuilder PdfExport(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the PdfExport event.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.PdfExport("onPdfExport")
)
)

Defines the handler of the Select client-side event. Fires when the Editor selection has changed.

C#
public EditorEventBuilder Select(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Select(@&lt;text&gt;
function(ev) {
//event handling code
}
&lt;/text&gt;)
)
)

Defines the handler of the Select client-side event. Fires when the Editor selection has changed.

C#
public EditorEventBuilder Select(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Select event.

Returns:

EditorEventBuilder

Returns the current instance of EditorEventBuilder .

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.Events(events =&gt; events
.Select("onSelect")
)
)