<%@ Page language="c#" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        </style>
</head>
<body onload="GetSetContent()">
    <form id="Form1" method="post" runat="server">
        <textarea id="TextArea1" style="width: 516px; height: 321px"></textarea>
        <input type="button" onclick="ReturnHtml()" value="OK" />
        <input type="button" onclick="window.close();" value="Cancel" />
        <script type="text/javascript">
	        //get a reference to the textarea in our dialog
		    var textArea = document.getElementById("TextArea1");
        	//get a reference to RadEditor from the parent page
		    var oElement = window.opener.editorElement;
        		
	        function GetSetContent()			
	        {
		      	
		        //set the content of the editor from the parent page to the textarea in the dialog
		        if (oElement)
		        {					
		            textArea.value = oElement.get_html(true);
		        }
	        }
	        function ReturnHtml()
			{
					
				if (oElement)
				{					
					oElement.set_html(textArea.value);
				}					
				window.close();
				return false;				
			}

        </script>
       
    </form>
</body>
</html>
