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

Destroying the editor and related DOM issue

2 Answers 66 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 23 Aug 2017, 03:57 PM

Hello,

We use several different kendo widgets on the page at the same time. We also have many editable divs. To not flood the DOM, I'm instantiating the editor on focus event for an editable div, and on focusout I'm wanting to destroy the widget and remove the DOM it has created.

I see that the documentation states that the added DOM must be removed manually. How do I determine which widgets the editor has created, so that I remove only those and none of the other widgets?

Thanks

2 Answers, 1 is accepted

Sort by
0
Kiril
Telerik team
answered on 25 Aug 2017, 11:34 AM
Hi,

Since focusout event is attached to all editable divs, the event.target property can be used for determining the widget that needs to be destroyed.

For convenience, I have created a small dojo example: http://dojo.telerik.com/IcIPoZ

I hope that answers your question.

Regards,
Kiril
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.

0
Chris
Top achievements
Rank 1
answered on 05 Sep 2017, 04:48 PM

Hello Kiril,

Thank you for that suggestion, i'll make use of that. Meanwhile your demo is a good example of another bug for an inline editor which I'll create a separate thread on.

All the best.

Tags
Editor
Asked by
Chris
Top achievements
Rank 1
Answers by
Kiril
Telerik team
Chris
Top achievements
Rank 1
Share this question
or