<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
    .rade_toolbar.Default .ListManager
    {
         background-image: url( http://www.telerik.com/DEMOS/ASPNET/RadControls/Editor/Skins/Default/buttons/Custom.gif);
    }
    </style> 
</head>
<body>
    <form id="form1" runat="server">
    <Asp:ScriptManager ID="ScriptManager1" runat="server" />
    
<telerik:RadEditor ID="RadEditor1" runat="server">
  <Tools>
     <telerik:EditorToolGroup>
            <telerik:EditorTool Name="ListManager" Text="List Manager" />
     </telerik:EditorToolGroup>
  </Tools>
    <Content>
        <select id="listBox1" style="width:120px" size="8" name="listBox1">
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3" selected>3</option>
        </select>
    </Content>
</telerik:RadEditor> 
<script type="text/javascript">
    Telerik.Web.UI.Editor.CommandList["ListManager"] = function(commandName, editor, args)
    {
        var selection = editor.getSelectedElement();
       
        var arg = new Object();
        arg.Select = selection;
        //debugger;
        if (selection.tagName != "SELECT")
        {
            alert ("Please select a dropdown SELECT element to use this tool!");
            return false;
        }
        else
        {
            editor.showExternalDialog(
               'ListManager.aspx',
               arg,
               450,
               460,
               null,
               null,
               'Insert Link',
               true,
               Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
               false,
               false);
        }   
    };
   </script>
   
   
    </form>
</body>
</html>
