Re: Preview doesn't have same format/style as Normal when EditCompleteDocument="false"

  •  01-31-2012, 6:39 AM

    Re: Preview doesn't have same format/style as Normal when EditCompleteDocument="false"

    Hi qsun,
     
    Please try the example below, it will hide the body style setting in html view.
     
    <%@ Page Language="C#" AutoEventWireup="True" %>
    <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>
    <html>
    <body>
        <form id="Form1" runat="server">
            <CE:Editor ID="editor1" runat="server" EditorBodyStyle="color:red">
            </CE:Editor>
            <input type="button" value="get html" onclick="getContent()" />
        </form>
    </body>
    </html>
    <script>
    function getContent()
    {
        var editor1=document.getElementById("<%= editor1.ClientID %>");
         var editwin = editor1.GetWindow();
         var editdoc = editor1.GetDocument();
        alert(editdoc.documentElement.innerHTML);
    }
    </script>
     
    Regards,
     
    Ken 
View Complete Thread