Created
March 26, 2013 14:58
-
-
Save lohithgn/5246012 to your computer and use it in GitHub Desktop.
Kendo Editor Events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@( | |
Html.Kendo().Editor() | |
.Name("kEditor") | |
.Events(events => events | |
.Change("change") | |
.Execute("execute") | |
.Select("select") | |
.Paste("paste") | |
) | |
.Value(@<text> | |
Kendo UI Editor allows your users to edit HTML in a familiar, user-friendly way.<br /> | |
In this version, the Editor provides the core HTML editing engine, which includes basic text | |
formatting, hyperlinks, lists, | |
and image handling. The widget <strong>outputs identical HTML</strong> across all major browsers, | |
follows | |
accessibility standards and provides API for content manipulation. | |
</text>) | |
.HtmlAttributes(new {style="width:740px;height:240px"}) | |
) | |
</p> | |
<div class="console"></div> | |
<script> | |
function change(e) { | |
$(".console").append("change <br />"); | |
} | |
function execute(e) { | |
$(".console").append("execute command :: " + e.name + "<br />"); | |
} | |
function select(e) { | |
$(".console").append("selection change <br />"); | |
} | |
function paste(e) { | |
$(".console").append("paste <br />"); | |
} | |
function contentLoad(e) { | |
$(".console").append("Content loaded in <b>" + $(e.item).find("> .k-link").text() + | |
"</b> and starts with <b>" + $(e.contentElement).text().substr(0, 20) + "...</b> <br />"); | |
} | |
function error(e) { | |
$(".console").append("Loading failed with " + e.xhr.statusText + " " + e.xhr.status + "<br />"); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment