Duplicated Editor with k-ng-model after configuring tools

3 posts, 0 answers
  1. Jan
    Jan avatar
    7 posts
    Member since:
    Mar 2016

    Posted 31 May 2016 Link to this post


    Like you see it on this example: http://dojo.telerik.com/@Janek91/AbUSE if I try to change available tools in the embedded Editor - in result I'm getting it duplicated, that's because I'm using k-ng-model directive. There is a possible workaround here: http://dojo.telerik.com/@Janek91/Eseva I can simply use Angular to paste HTML into <textarea> tag and not to use k-ng-model. But is there really no other way to use k-ng-model, configure tools and don't get duplicated Editor?

  2. Ianko
    Ianko avatar
    1729 posts

    Posted 01 Jun 2016 Link to this post

    Hi Jan,

    The same questions is already posted in support ticket. I suggest you to continue the conversation there. 

    For anyone interested in the situation: The main problem is that Kendo Editor is intialized two times by using this implementation. 

    In this article it is documented how to configure Kendo widgets using Angular approaches—http://docs.telerik.com/kendo-ui/AngularJS/introduction.

    Suggestions for the case here:

    1. The most effective and simple one is to use the k-tools with an array of the tools you need to have: 

      <textarea id="editor" kendo-editor k-ng-model="html" k-tools="['bold', 'italic']"></textarea>

    2. Similar approach is to define the array in the $scope of the module and set it as a value to the k-tools attribute—http://dojo.telerik.com/uPoRu;

    3. If you need to fine-tune the widget similar to JavaScript initialization you can define the options in the $scope and set the k-options attribute to the object's name—http://dojo.telerik.com/uPoRu/3.

    4. If, however, you need to not use the Angular $scope and attributes to configure the widget you can still get the instance by using the data() method and modify its options by using the setOptions method. Here you are an example—http://dojo.telerik.com/uPoRu/2.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Jan
    Jan avatar
    7 posts
    Member since:
    Mar 2016

    Posted 01 Jun 2016 in reply to Ianko Link to this post


    I've noticed ticket option after I posted question here, so I'm sorry for that information mess. Thank you very much for a quick and satisfying answer. I need to read documentation more carefully. Everything works fine now.

Back to Top