Hi,
I want to refresh the list of snippet from javascript so that i can change snippet list by changing a option.
i have tried this way but list won't get refresh. any possible way to fix this.
function PopulateSnippets(data) {
var editor = $("#Body").data("kendoEditor");
editor.options.insertHtml.length = 0;
var snippetArray = [];
$(data).each(function (index, item) {
snippetArray.push({
text: item.Text,
value: item.Value
});
});
editor.options.insertHtml = snippetArray;
}
I want to refresh the list of snippet from javascript so that i can change snippet list by changing a option.
i have tried this way but list won't get refresh. any possible way to fix this.
function PopulateSnippets(data) {
var editor = $("#Body").data("kendoEditor");
editor.options.insertHtml.length = 0;
var snippetArray = [];
$(data).each(function (index, item) {
snippetArray.push({
text: item.Text,
value: item.Value
});
});
editor.options.insertHtml = snippetArray;
}