Hello,
I load the following via ajax and the shown javascript Alert fires proving jquery and javascript are working. Editor Events work but I need to clear the editor contents programmatically. At the console, well after all loaded and completed, $("#editor") is undefined. I am looking at this documentation. http://docs.telerik.com/kendo-ui/aspnet-mvc/helpers/editor/overview#existing-instances
<div id="editorWrapper">
@(Html.Kendo().Editor()
.Name("editor")
.HtmlAttributes(new { @class = "desc-editor", name = "Description", id = "Description" })
.Resizable(resizable => resizable.Content(true).Toolbar(true))
.StyleSheets(css => css
.Add(Url.Content("~/Content/editorStyles.css"))
)
.Tools(tools => tools
.Clear()
.Bold().Italic().Underline().Strikethrough()
).Events(events => events
.Change("change")
.Execute("execute")
.Select("select")
.Paste("paste")
).Value(@<text> </text>)
)
<script>
$(function () {
alert($(".input-field").length);
//Notice that the Name() of the Editor is used to get its client-side instance.
var editor = $("#editor").data("kendoEditor");
});
</script>
</div>