Kendo UI Snippets

6 posts, 0 answers
  1. Chris
    Chris avatar
    3 posts
    Member since:
    Jul 2018

    Posted 16 Jul Link to this post

    I am trying to capture the even where a snippet is selected. I cant find any documentation for snippets in angular. Is this not supported? Is there events associated with this widget?
  2. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    931 posts

    Posted 17 Jul Link to this post

    Hi Chris,

    I am afraid I do not understand the inquiry. Can you please explain in further details what do you mean by:

    "capture the even where a snippet is selected. I cant find any documentation for snippets in angular"

    ... as well as which component are you referring to?

    The full list of the currently available Kendo UI for Angular components is available in our documentation:

    https://www.telerik.com/kendo-angular-ui/components/

    Looking forward to your response.

    Regards,
    Dimiter Topalov
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Chris
    Chris avatar
    3 posts
    Member since:
    Jul 2018

    Posted 17 Jul in reply to Dimiter Topalov Link to this post

    https://demos.telerik.com/kendo-ui/editor/snippets

     

    The snippet widget above. I was wondering if there is an event triggered when the user select an item?

  4. Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    931 posts

    Posted 18 Jul Link to this post

    Hello Chris,

    Thank you for the clarification. The described functionality is the "insertHtml" tool that executes the "inserthtml" command. This triggers the "execute" event that contains information for both the executed action name and an object that represents the action itself:

    https://docs.telerik.com/kendo-ui/api/javascript/ui/editor/events/execute

    https://dojo.telerik.com/IDiYotuJ

    At this point the Editor widget is available in the Kendo UI for jQuery suite only and there is no available Kendo UI for Angular component (we will likely start to work on one towards the end of this year).

    I am switching this thread's product and forum to Kendo UI for jQuery Editor respectively. If you have further questions about the Editor functionalities or API, please select the Kendo UI --> Editor product and forum when creating the ticket or forum thread. Thank you in advance.

    Regards,
    Dimiter Topalov
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. Chris
    Chris avatar
    3 posts
    Member since:
    Jul 2018

    Posted 19 Jul in reply to Dimiter Topalov Link to this post

    I have had success with the jquery version of this control. I can capture the execute, change, paste...events that are specified, but all of these events fire before the HTML content is added to the text box. I need to add focus to specific fields within the HTML string after the user makes a selection. Is there any event or notification once the text box is populated? Is the Kendi UI code available for edit to paying customers?
  6. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    826 posts

    Posted 23 Jul Link to this post

    Hello Chris,

    You are right that the execute event of the Editor will actually fire before the tool has performed its action. In order to select a specific part of the newly inserted HTML, you could execute that action in a timeout function:
    execute: function(e) {
      var editor = e.sender;
       
      setTimeout(function() {
        var range = editor.createRange();
        range.selectNodeContents($(editor.body).find('.link')[0]);
        editor.selectRange(range);
      }, 0);
    },

    Note the selectRange() method which would allow you to select the specified part of the Editor contents.

    Here you will find a small sample implementing the above.

    As per your second question, yes, licensed users have access to the Kendo UI source code and can make changes to it. Keep in mind that such changes are not officially supported and may result in improper behaviour of some functionalities.

    Regards,
    Veselin Tsvetanov
    Progress Telerik
    Try our brand new, jQuery-free Angular 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