Textarea not updated with an ajax postback

  •  11-03-2010, 6:12 AM

    Textarea not updated with an ajax postback

    To save editor changes, I have a button that does an ajax __doPostback(). It happens to be the Apply button of a Webpart
    EditorZone.
     
    If I make edits in the Cute Editor's property dialog or html tab, and immediately click on the Apply button, the edits are lost. If however I click back into the editor before clicking the Apply button, the edits are saved.

     
    Debugging shows that the Cute Editor's textarea is only updated if I click into the edior , and I need to do the following to 'force' it to be updated:
     
    If Not Page.IsPostBack Then
                        AjaxControlToolkit.ToolkitScriptManager.RegisterOnSubmitStatement(Me.Page, Me.GetType(), "UpdateEditorTextArea", "var ed = $('.CuteEditor')[0]; if(ed){var layout = ed.getHTML(); ed.setHTML(layout)};")
                    End If
     
    Someone else must have encountered this! If I use a normal form submit button, the problem goes away. However I want the editor to work within a standard asp.net EditorZone, so I want it to work with the standard EditorZone Apply button.
     
    Happens in 6.0 & 6.6 of Cute Editor
     
View Complete Thread