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?
- <%@ Page Language="c#" ValidateRequest="false" %>
-
- <%@ Register TagPrefix="RTE" Namespace="RTE" Assembly="RichTextEditor" %>
-
- <!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>
- <script runat="server">
- public string ReadTextFileDate()
- {
- string strInput = "";
- string GetStream = "";
- string filePath = Server.MapPath("~/actual.htm");
- if (System.IO.File.Exists(filePath))
- {
- System.IO.StreamReader sr = new System.IO.StreamReader(filePath, UnicodeEncoding.GetEncoding("utf-8"));
- strInput = sr.ReadLine();
- while (strInput != null)
- {
- GetStream += strInput;
- strInput = sr.ReadLine();
- }
- sr.Close();
- }
- return GetStream;
- }
- protected override void OnLoad(EventArgs e)
- {
- Editor1.Text = ReadTextFileDate();
- base.OnLoad(e);
- }
- </script>
- </head>
- <body>
- <form id="Form1" method="post" runat="server">
- <RTE:Editor ID="Editor1" runat="server" EditCompleteDocument="true" />
- </form>
- </body>
- </html>
Regards,
Ken