Insert text from RadListView into rad editor at cursor position

2 posts, 0 answers
  1. Ravi
    Ravi avatar
    14 posts
    Member since:
    Jul 2014

    Posted 09 Dec 2015 Link to this post

    This is my RadListBox

         <tele:RadListBox ID="listboxview" runat="server"  Height="500px"  Width="100%" Font-Size="11px"  DataTextField="master"
                                                 DataValueField="master" OnClientSelectedIndexChanged="putTag"    OnItemDataBound="listboxview_ItemDataBound"  ></tele:RadListBox>

     This is my RadEditor

         <tele:RadEditor ID="RadEditor1" runat="server" ToolbarMode="RibbonBar" AutoResizeHeight="true" Skin="Office2007"  EnableResize="false"  Height="760px"     _ToolsFile="tools.xml"    Width="100%" >  </tele:RadEditor>


    This is my Javascript method for pasting the Text to the Cursor Postion.

     function putTag(sender, eventArgs) {
                        var itemsValue = sender.get_selectedItem().get_value();  // i got the value there from selecting the Item in the Listview
                        var editor = $find("<%= RadEditor1.ClientID %>");
                        var rng = editor.getSelection().getRange();
                        editor.pasteHtml("[/" + itemsValue + "/]");

    when i click on the Listview then i want the text to the RadHtmlEditor, but using the Following codes i cant do this.

    Plz correct my code.



  2. Ianko
    Ianko avatar
    1875 posts

    Posted 09 Dec 2015 Link to this post

    Hello Ravi,

    The same is discussed here—

    Did you try the suggestion posted there? Is there any difference with the situation here? 

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top