PasteCleanup event: How do we get the reference to the editor?

1 Answer 18 Views
Editor
Mrugendra
Top achievements
Rank 1
Iron
Mrugendra asked on 11 Mar 2022, 12:53 AM

Hello,

=> We have a solution that has multiple editors.
=> The editors have paste rules that are dynamic in nature,  editors can be added dynamically as well.
=> We implemented a common custom paste cleanup callback.
=> In this method, we need the reference to the editor where the paste was done, so that we can read the properties of the editor and determine what to keep in the pasted content.

There does not seem to be a way to find out which editor triggered the pasteCleanup callback,  the "this" variable has pasteCleanup settings and not the editor itself.

Is there a way to get a reference to the editor in question? We are using the focus/keydown events to keep track of active editors, however we might miss something somewhere, and would like the pasteCleanup callback itself to tell us what editor it has been called from.

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 15 Mar 2022, 08:27 AM

Hello, Mrugendra,

Currently there is no way to get a reference to the Editor from the pasteCleanup callback itself. What you are currently doing is the only approach I could think of to achieve the requirement. 

Let me know if you have any further questions on the matter.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Editor
Asked by
Mrugendra
Top achievements
Rank 1
Iron
Answers by
Martin
Telerik team
Share this question
or