<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" ValidateRequest="false" %>

<!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></title>
	<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />

    <style runat="server" id="cssFormatting" type="text/css">
        body
        {
            background-color: transparent;
        }
        legend
        {
            font: normal 12px Arial, Verdana, Sans-serif;
        }
        .diff_new
        {
            background-color: #00ff00;
        }
        .diff_deleted
        {
            color: Red;
            text-decoration: line-through;
        }
        table.diff_new
        {
            border: 2px solid green;
        }
        .diff_new td
        {
            padding: 5px, 5px, 5px, 5px;
            background-color: #00ff00;
        }
        table.diff_deleted
        {
            padding: 5px, 5px, 5px, 5px;
            border: 2px solid red;
            filter: alpha(opacity=20);
            -moz-opacity: 0.2;
            opacity: 0.2;
        }
    </style>

</head>
<body>
    <form id="form1" runat="server">
	<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
		<Scripts>
			<%--Needed for JavaScript IntelliSense in VS2010--%>
			<%--For VS2008 replace RadScriptManager with ScriptManager--%>
			<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
			<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
			<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
		</Scripts>
	</telerik:RadScriptManager>
	<script type="text/javascript">
		//Put your JavaScript code here.
    </script>
	<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
	</telerik:RadAjaxManager>
	<div>
        <telerik:RadEditor ID="RadEditor1" runat="server">
        </telerik:RadEditor>

        <asp:HiddenField ID="initContentHolder" runat="server" />
        <asp:Button ID="Button1" runat="server" Text="Set Initial Content" OnClientClick="setInitialContent(); return false;" />


        <asp:Button ID="Button2" runat="server" Text="Display and store the difference result" />

        <div id="diffViewer" runat="server">
        </div>

        <script type="text/javascript">
            function setInitialContent()
            {
                var editor = $find("<%= RadEditor1.ClientID %>");//get reference to RadEditor
                editor.set_initialContent();//set initial content

                //get reference to a hidden field that will be used to pass the initial content to the code-behind
                var initContentHolder = $get("<%= initContentHolder.ClientID %>");
                initContentHolder.value = editor.get_html(true);//set currect content of the editor to the hidden field
            }
        </script>
	</div>
	</form>
</body>
</html>
