Change tools at runtime

2 posts, 1 answers
  1. Arik
    Arik avatar
    1 posts
    Member since:
    Aug 2017

    Posted 29 Aug Link to this post

    I'm using the editor for AngularJS. The tools array is passed to the kendo-editor directive by the k-tools property.
    I want to change the tools displayed in the toolbar at runtime. I tried to change the tools array and calling the editor.toolbar.refreshTools() method, but it didn't work.

    Is it possible to change the value of the tools array passed and then call some method to re-render the toolbar?
    Or is there some other way to change the displayed tools at runtime?

  2. Answer
    Ianko
    Admin
    Ianko avatar
    1729 posts

    Posted 30 Aug Link to this post

    Hello Arik,

    I am afraid there is no possible way to just refresh the tools collection of the Editor's toolbar. Due to its complexity, the entire widget should be destroyed and recreated with a new set of options (or updated ones). You can do that by calling the destroy method

    Or, with AngularJS, you can use the k-rebind attribute: http://docs.telerik.com/kendo-ui/AngularJS/introduction#widget-update-upon-option-changes. Like in this example here: http://dojo.telerik.com/arAjAs

    Regards,
    Ianko
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top