Events
You can subscribe to all ImageEditor events and then use them to further customize the behavior of the component.
The example below demonstrates how to use the Execute
event that the ImageEditor generates when the user executes a command.
@using Kendo.Mvc.UI
@(Html.Kendo().ImageEditor()
.Name("imageEditor")
.Height(700)
.SaveAs(s => s.FileName("image_edited.png"))
.ImageUrl(@Url.Content("~/shared/images/photos/sample.jpg"))
.Events(ev => {
ev.Execute("onExecute");
})
)
@addTagHelper *, Kendo.Mvc
<h4>ImageEditor</h4>
<kendo-imageeditor name="imageEditor" height="700" image-url="@Url.Content("~/shared/images/photos/sample.jpg")"
on-execute="onExecute">
<save-as file-name="image_edited.png" />
</kendo-imageeditor>
<script>
function onExecute(e) {
console.log(e.command);
}
</script>