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

[Breaking Change] OnClientPasteHtml not firing for DocumentManager

1 Answer 142 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Edward Sudit
Top achievements
Rank 1
Edward Sudit asked on 01 Apr 2013, 03:05 PM
It appears that the latest release of Telerik DLL's is no longer finring the OnClientPasteHtml event for the DocumentManager tool in RadEditor.  We have some logic coded for this event, which has been working until we upgraded the DLL's to the latest release. 
1. Does anyone know why this event was removed from the DocumentManager tool?
2. Is there a workaround or fix for this so that we don't have to completely change the logic that is currently working in our production environment?

Thank you for your assistance,
Ed Sudit

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 03 Apr 2013, 01:56 PM
Hello Ed,

Starting from Q3 2012 SP2, the OnClientPasteHtml event does not fire the commands related to link insertion or editing. Such commands are DocumentManager, InsertLink, LinkManager and SetLinkProperties.

The reason for this change is that in the earlier versions, there was a huge bug which appeared when selecting multiple lists and applying a link to them. This wrapped the <li> tags in a <a> tag, which was invalid XHTML.

In the current Q1 2013 release, there is a new OnClientDomChange property, which allows to inspect the inserted link(s) tags via the Document and Link Managers and modify it (them). Here is an example:

<telerik:RadEditor runat="server" ID="RadEditor1" OnClientDomChange="OnClientDomChange">
<DocumentManager ViewPaths="~/" UploadPaths="~/" />
</telerik:RadEditor>
<script>
function OnClientDomChange(editor, args) {
alert(args.get_commandName());
}
</script>



Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Edward Sudit
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or