I am trying to implement a custom tool in the Kendo Editor, following demo/doc implementation and always getting a typeError of some form whenever the custom tool uses a kendo template. For example:
@(Html.Kendo().Editor()
.Name("editor")
.Tools(tools => {
tools
.Clear()
.Bold()
.Italic()
.CustomTemplate(temp => temp.Template(
Html.Kendo().DropDownList()
.Name("ddl1")
.DataTextField("Text")
.DataValueField("Value")
.BindTo(new List<object>
{
new { Text = "text 1", Value = "Value 1" },
new { Text = "text 2", Value = "Value 2" },
new { Text = "text 3", Value = "Value 3" },
new { Text = "text 4", Value = "Value 4" }
})
.ToClientTemplate()
.ToHtmlString()
));
})
)
In this case the error is as follows:
Uncaught TypeError: Cannot read properties of null (reading 'length')