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

[Solved] Drop TreeView Node on RadEditor on selected position

1 Answer 128 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Hrushikesh Mokashi
Top achievements
Rank 1
Hrushikesh Mokashi asked on 13 Aug 2009, 02:20 PM
Hi All,

I am using RadControl Q1 2009 control.

I am using RadEditor, and radTreeview control.

I want to drop the theeview node to radeditor on selected position.

In currently it drop the data on to first line of rad editor.
But i want to drop it on selected cursor position.

How can i dow this?


My code for droping is below.

 

 function OnClientNodeDropping(sender, args) 
        {                        
            var editor = $find("<%=RadEditor1.ClientID%>");                                              
     editor.setFocus(); 
       editor.pasteHtml("test"); 
 
 
 }

I have tried the the one more code

 function OnClientNodeDropping(sender, args) 
        {                        
            var editor = $find("<%=RadEditor1.ClientID%>");                                              
    editor.setFocus(); 
    editor.setActive(); 
    var rng = editor.getSelection().getRange(); 
    rng.moveToPoint(294, 322); 
    rng.expand("word"); 
    rng.select(); 
     editor.pasteHtml("test")
}


But it also not work it gives error as '"Incompatible markup pointers for this opertion'



 
  


Thanks,

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 14 Aug 2009, 03:59 PM
Hi Hrushikesh,

Please, see the following live example which could be useful for your scenario: Drag-and-drop Images in RadEditor.

Greetings,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Hrushikesh Mokashi
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or