# Events

The Telerik UI Editor for ASP.NET MVC exposes multiple [events](https://www.telerik.com/aspnet-mvc/documentation/api/kendo.mvc.ui.fluent/editoreventbuilder) that allow you to control and customize the behavior of the component.

For a complete example of the basic Editor events, refer to the [demo on using the events of the Editor](https://demos.telerik.com/aspnet-mvc/editor/events).

## Handling by Handler Name

The following example demonstrates how to subscribe to events by a handler name.

```Razor HtmlHelper
    <script>
        function onChange(e) {
            // Handle the change event.
        }

        function onPaste(e) {
            // Handle the paste event.
        }
    </script>

    @(Html.Kendo().Editor()
        .Name("editor")
        .HtmlAttributes(new { style = "width: 100%; height:470px" })
        .Events(e => e // Configure the client-side events.
            .Change("onChange")
            .Paste("onPaste")
        )
    )
```

## Handling by Template Delegate

The following example demonstrates how to subscribe to events by a template delegate.

```Razor HtmlHelper
    @(Html.Kendo().Editor()
        .Name("editor")
        .HtmlAttributes(new { style = "width: 100%; height:470px" })
        .Events(e => e
            .Change(@<text>
                function() {
                    // Handle the change event inline.
                }
            </text>)
            .Paste(@<text>
                function() {
                    // Handle the paste event inline.
                }
            </text>)
        )
    )
```

## Next Steps

* [Using the Editor Events (Demo)](https://demos.telerik.com/aspnet-mvc/editor/events)

## See Also

* [Using the API of the Editor for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/editor/api)
* [Server-Side API of the Editor](https://www.telerik.com/aspnet-mvc/documentation/api/editor)
* [Client-Side API of the Editor](https://docs.telerik.com/kendo-ui/api/ui/editor)
