Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
523
BUG?? Can't get text of htmleditor
posted

I'm using version 11.1.20011.2135, I load the editor from an html file, this works fine, I edit the text on the editor and when I try to get the text (webHtmlEditor1.Text), this hasn't change. I load and retrieve the text from codebehind.

Thanks in advance for any help

EDIT:

This only occurs when I change the text in the design view, if the text is modified in the html view I get the modified text.

 

Parents
No Data
Reply
  • 12679
    posted

    Hello,

    Thanks for posting in the forums.  I've tested the below code with the RTM of 11.2 (11.2.20112.1019) .Once the page is loaded I put some html into the view, then in desing view I update the Editor and post it to the server. I'm inspecting the values of below properties and  i confirm that I'm getting the changes made on the client prior the post,

     

    1. protected void Page_Load(object sender, EventArgs e)
    2.   {
    3.       if (!this.IsPostBack)
    4.       {
    5.           this.WebHtmlEditor1.Text = "<div>bla</div>";
    6.       }
    7.       else
    8.       {
    9.           var html = this.WebHtmlEditor1.TextXhtml;
    10.           var text = this.WebHtmlEditor1.Text;
    11.           var plainText = this.WebHtmlEditor1.TextPlain;
    12.       }         
    13.   }

     

     

Children