test Blog 1

admin | 2021-08-01 14:31:06

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 4 instances dynamically, CKEditor 4 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:

    var data = CKEDITOR.instances.editor1.getData();

    // Your code to save "data", usually through Ajax.

If you do not save your data with a library that already encodes it by using the JavaScript encodeURIComponent method, but do it manually instead, you will have to remember to use encodeURIComponent to properly encode the data that is being sent.

Note that the ID of the original element that is replaced with CKEditor was passed to the instances object to make it possible to retrieve the editor instance.

Featured Products

Check our Products, more Product you can find in our Store , Let's Shopping Now.