This is a migrated thread and some comments may be shown as answers.

Kendo UI Snippets

5 Answers 243 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 16 Jul 2018, 07:31 PM
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?

5 Answers, 1 is accepted

Sort by
0
Dimiter Topalov
Telerik team
answered on 17 Jul 2018, 03:41 PM
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.
0
Chris
Top achievements
Rank 1
answered on 17 Jul 2018, 04:46 PM

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?

0
Dimiter Topalov
Telerik team
answered on 18 Jul 2018, 08:57 AM
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.
0
Chris
Top achievements
Rank 1
answered on 19 Jul 2018, 07:05 PM
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?
0
Veselin Tsvetanov
Telerik team
answered on 23 Jul 2018, 12:57 PM
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.
Tags
Editor
Asked by
Chris
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Chris
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Share this question
or