Raja Afrika of the Afrika 8
Thursday, April 18, 2024
 
Back to Raja's Blog

Raja's Blog
Not All Who Wander Are Lost

FckEditor inside UpdatePanel broken
Posted: Friday, August 1, 2008

FCKEditor is a ccery cool WYSIWYG editor which allows you to type and format HTML. One downside is that this control does not currently have proper support for AJAX UpdatePanels in .NET.


After searching the net for very convoluted solutions to this very basic .NET need, I came across Dave Parslow's Website where he presents the following simple hack to get your FCKEditor working in update panels:


this.Page.ClientScript.RegisterOnSubmitStatement(

    this.GetType(),

    "AjaxHack",

    "for ( var i = 0; i < parent.frames.length; ++i ) if ( parent.frames[i].FCK ) parent.frames[i].FCK.UpdateLinkedField();"

    );