I have a WebHtmlEditor in a contentpage, when I 1st load the page this is the html for WebHtmlEditor:
<DIV style="WIDTH: 100%; FONT-FAMILY: sans-serif; HEIGHT: 100%; FONT-SIZE: 10pt; layout: layout-grid: both fixed 12px 12px" id=ctl00_ctl00_cphBody_cphBody_fvHardship_tabsItems_tabHardInfo_AdditionalInformationLabel_tw contentEditable=true align=left _oldE="true" content="false"><P>test add some more text and some more</P><P>and more</P></DIV>
After I do a postback the text is gone and the html changes to:
<DIV style="WIDTH: 100%; FONT-FAMILY: sans-serif; HEIGHT: 100%; FONT-SIZE: 10pt" id=ctl00_ctl00_cphBody_cphBody_fvHardship_tabsItems_tabHardInfo_AdditionalInformationLabel_tw align=left></DIV>
<input name="ctl00_ctl00_cphBody_cphBody_fvHardship_tabsItems_tabHardInfo_AdditionalInformationLabel_t_a" id="ctl00_ctl00_cphBody_cphBody_fvHardship_tabsItems_tabHardInfo_AdditionalInformationLabel_t_a" type="hidden" value="%3CP%3Etest add some more text and some more%3C/P%3E%3CP%3Eand more%3C/P%3E"/>
Notice the <p> are gone, now if I do a refresh the text is back.....Any help is appreciated.
I believe that this is the same bug that we are experiencing, could infragistics please comment on this?
I have never been able to reproduce the issue in neither our test nor production-environment, but a journalist working in the company says that the error occurs about 20% of the time. He also says that if he copies his changes once more into the text field and clicks save, it works as it is supposed to.
After going through the code line for line the only plausible explanation for this behaviour is that the TextXHtml property of our WebHtmlEditor sometimes (but not always) doesn't return the new value.
Our journalist is using FireFox, version 3.5.3.
Is this a known bug. Has it been fixed? We are using version 9.1 of the infragistics components.
Cheers, Johan
PS. While debugging the project I can see that both the Text and the TextXHtml properties contains Markup language, even though the documentation specifies that only the later should. Could this somehow be related?
if you don't need spell checking straight off the ajaxtoolkit htmleditor works well!
I am still not able to get value after postback on Chrome (working on IE). I tried following steps:
I created keypress event using below code.
<ClientSideEvents KeyPress="Editor1_KeyPress"></ClientSideEvents>
Next created below function
function Editor1_KeyPress(oEditor, keyCode, oEvent) {
//Call update on each keypress to keep hidden field in sync with display.
oEditor._update();}
When I type something in editor my control successfully enter the method and executes "oEditor._update();" without any error.
Now, when I click on a button on page to make postback, I looses value of Editor
Thank you, Mackie.
I had the same issue and your suggestion helped me.
Add this as the KeyPress client side event handler:
function HtmlEditorKeyPress(oEditor, keyCode, oEvent) { //Call update on each keypress to keep hidden field in sync with display. oEditor._update();}
The problem is that in non-IE browsers the internal form variable is not updated as you type but only when focus is lost meaning that the old value can be set to the server if the blur event does not fire. The event handler above calls the internal function that does this syncing. Problem solved!