making an ajax call with CKEDITOR


jqeury cannot pickup the texarea input text in the iframe.  CKEDITOR is a pure javascript markup, you will need to use the editor getData method

2014-12-09 22:06:36gstlouis

Retrieving Data from CKEditor

Some applications need to handle all data on the client side, sending it to the server using their specific methods. This is what usually happens in inline editing — with the possibility to create and destroy CKEditor instances dynamically, CKEditor is a perfect match for Ajax applications. If this is the case, it is enough to use the JavaScript API methods to easily retrieve the editor instance data.

To retrieve the editor data, call the CKEDITOR.editor.getData method of the editor instance. For an editor instance with an ID of editor1, this would look like the following:

<script> var data = CKEDITOR.instances.editor1.getData(); // Your code to save "data", usually through Ajax. </script>

2014-12-09 22:06:46

you also need to unicode before you do the ajax call to.
This function encodes special characters


Encode a URI:

var uri = " test.asp?name=ståle&car=saab";
var res = encodeURIComponent(uri);

The result of res will be:

Definition and Usage

The encodeURIComponent() function encodes a URI component.

This function encodes special characters. In addition, it encodes the following characters: , / ? : @ & = + $ #

Tip: Use the decodeURIComponent() function to decode an encoded URI component.

all browser supported

2014-12-09 22:49:24