Re: HTML Conversion/Cleaning/Corruption

  •  04-07-2014, 3:56 AM

    Re: HTML Conversion/Cleaning/Corruption

    Hi rhonsberger,

     

     

    I used the way below to load your htm file programmatically for the editor Text property, it shows correct. can you try it too?

     

    1. <%@ Page Language="c#" ValidateRequest="false" %>  
    2.   
    3. <%@ Register TagPrefix="RTE" Namespace="RTE" Assembly="RichTextEditor" %>  
    4.   
    5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    6. <html xmlns="http://www.w3.org/1999/xhtml">  
    7. <head>  
    8.     <script runat="server">  
    9.         public string ReadTextFileDate()  
    10.         {  
    11.             string strInput = "";  
    12.             string GetStream = "";  
    13.             string filePath = Server.MapPath("~/actual.htm");  
    14.             if (System.IO.File.Exists(filePath))  
    15.             {  
    16.                 System.IO.StreamReader sr = new System.IO.StreamReader(filePath, UnicodeEncoding.GetEncoding("utf-8"));  
    17.                 strInput = sr.ReadLine();  
    18.                 while (strInput != null)  
    19.                 {  
    20.                     GetStream += strInput;  
    21.                     strInput = sr.ReadLine();  
    22.                 }  
    23.                 sr.Close();  
    24.             }  
    25.             return GetStream;  
    26.         }  
    27.         protected override void OnLoad(EventArgs e)  
    28.         {  
    29.             Editor1.Text = ReadTextFileDate();  
    30.             base.OnLoad(e);  
    31.         }  
    32.     </script>  
    33. </head>  
    34. <body>  
    35.     <form id="Form1" method="post" runat="server">  
    36.         <RTE:Editor ID="Editor1" runat="server"  EditCompleteDocument="true" />  
    37.     </form>  
    38. </body>  
    39. </html>  
     

    Regards,

     

    Ken 

View Complete Thread