I followed the demo source for drag and drop in RadEditor, in my case it is text instead of image. Once it drops on Editor, the action supposes retaining in the undo list or redo, however it is not. On client side I used pasteHtml.
I tried to reproduce the problem, but to no avail.
I modified the mentioned online demo, so that text values are pasted instead of images. While testing with dragging inside the content I did not find any unexpected behavior. The correct data is being set inside the Undo and Redo list.
Please investigate the attached project and let me know if I am missing something important that could lead to the described issue.
If the case is that the values inside the lists are incorrect, note that in some cases you should use the second parameter of the pasteHtml() method to set a proper name of the pasted Object, which is used for the populated data of the lists.
You could follow this example code:
function OnClientNodeDropping(sender, args) {
var editor = $find("<%=RadEditor1.ClientID%>");
var value = args.get_sourceNode().get_value();
var event = args.get_domEvent();
document.body.style.cursor = "default";
var result = isMouseOverEditor(editor, event);
if (result) {
editor.pasteHtml(value, "Dragged value");
}
setOverlayVisible(false);
}
Regards,
Ianko
Telerik
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 the blog feed now.