Skip to content

Instantly share code, notes, and snippets.

@lohithgn
Created March 26, 2013 14:58
Show Gist options
  • Save lohithgn/5246012 to your computer and use it in GitHub Desktop.
Save lohithgn/5246012 to your computer and use it in GitHub Desktop.
Kendo Editor Events
@(
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