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

Undo & Redo on RadEditor

2 Answers 120 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Duy
Top achievements
Rank 1
Duy asked on 27 Aug 2013, 01:27 AM

Hi,

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. 

Kind Regards,

Duy

2 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 29 Aug 2013, 02:35 PM
Hi Duy,

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.
0
Duy
Top achievements
Rank 1
answered on 30 Aug 2013, 02:45 AM
Thanks Lanko,

I played around with radjaxpanel and radajaxmanagerproxy and it works now
Tags
Editor
Asked by
Duy
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Duy
Top achievements
Rank 1
Share this question
or