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
35
Web Text Editor Issue with Google Chrome
posted

Hiii...

I have been using Web Text Editor to post a Comment in a  web form. As  Soon as i post  the comment the record is being added as below in the relevant Comment feild  of the relevant table. 

<body bgcolor='White' style='font-family:sans-serif;font-size:10pt;'></body>

The Text should be the one  which is entered by the user without the above tag.

 

Highly appreciable if i can have a reply as soon as possible.

 

Many Thanks in advance..

(PLS NOTE : This happens only in Google Chrome)


 

Parents
  • 20
    posted

    Hi,

    I was also facing this issue. There is one workaround for this.

    1. Write following javascript in the head tag of your HTML.

    document.forms[0].onsubmit = FixWebEditorTextIssue;

     function FixWebEditorTextIssue() {

    var oEditor = iged_getById('<%= YourHTMLEditorID.ClientID %>');

    if(oEditor) { var text = oEditor.getText();oEditor.setText(text); }  }

    2. Add the event for "OnTextChanged" in your editor.

    3. Add following code in your code behind under the event that is created in step 2.

    protected void tbJrnllblNotes_TextChanged(object sender, Infragistics.WebUI.WebHtmlEditor.TextChangedEventArgs e)

    { YourHTMLEditorID.Text = e.NewText; }

     

    Hope this will help to fix your issue.

    Thanks,

    --Virag

Reply Children