Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Using a custom template for a custom button on kendo ui editor

$
0
0

I'm trying to create a custom button for the kendo ui editor. The button works fine except when I try to use a custom template.
Here's the code for my custom button:

varcurrentDateAction = {
    name: 'currentDate',
    tooltip: vm.TemplateLetterCurrentDateLabel(),
    template: '<button class="k-button">'+ vm.TemplateLetterCurrentDateLabel() + '</button>',
    exec: function() {
        vareditor = $(this).data('kendoEditor');
        editor.exec('inserthtml', { value: vm.TemplateLetterCurrentDate() });
    }
};

If I comment the template line, the button works, otherwise it doesn't.
What do I have to do, to have a custom template for my button?


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>