FCKEditor and Ajax Requests

This took me a while to figure out, so I hope this little tidbit helps someone…

If you want to send XHTML over GET or POST in an Ajax request with FCKEditor, be sure to do something like this:

var pars = 'page_content=' + escape(FCKeditorAPI.GetInstance('page_content').GetXHTML());

The critical part of this is escape() – it is the javascript equivalent of PHP’s urlencode.


5 Responses to FCKEditor and Ajax Requests

  1. adam says:

    watch your language in posts plz, i read this at work!

  2. hhhhhh says:


  3. Cameron says:

    Thank you for this. My ajax FCK forms were breaking, and i couldnt figure out why, until I read this.

  4. Jason says:

    Thank you so much!!!

    This totally sorted out my issue with FCKeditor.

  5. Lars says:

    Thanks – solved my problem!! You rock dude!

%d bloggers like this: