Re: How to show text on editor from variable

  •  08-11-2010, 11:27 AM

    Re: How to show text on editor from variable

    You can try the following code:
    <%@ Page Language="C#" %>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
    <head>
    </head>
    <body>
        <form id="Form1" runat="server">
        <CE:Editor ID="Editor1" EditorWysiwygModeCss="../example.css" ThemeType="Office2007"
            EditCompleteDocument="true" AllowPasteHtml="false" runat="server">
        </CE:Editor>
        <br>
        <asp:Button ID="btnUpdate" OnClick="Submit" runat="server" Text="Submit"></asp:Button><br />
        <asp:TextBox ID="textbox1" runat="server" TextMode="MultiLine" Height="250px" Width="750px"
            Font-Name="Arial"></asp:TextBox>
        </form>
    </body>
    </html>
    <script runat="server">
      
        void Page_Load(object sender, System.EventArgs e)
        {
            if (IsPostBack)
            {
                Editor1.SaveFile("document.htm");
                textbox1.Text = Editor1.Text;
            }
            else
            {
                Editor1.Text = "123";
            }
        }
        public void Submit(object sender, System.EventArgs e)
        {
            Editor1.SaveFile("document.htm");
            textbox1.Text = Editor1.Text;
        }
    </script>
    But when I change the Text ="123", it shows '132',  can you send your full code to me which can reproduce this issue? We will check it on our end.
     
    Regards,
    Eric
View Complete Thread