Change tools at runtime

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

    Posted 29 Aug 2017 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 avatar
    1757 posts

    Posted 30 Aug 2017 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: Like in this example here:

    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