I'm using CKEditor. I am saving the form values with ajax using page methods.
But the content of CKEditor value cannot be saving into the table.
I dont postback the page.
What can I do for that?
If you need to get the actual data from CKEditor 4 at any moment using JavaScript, use the editor. getData() method as described above.
each(function(index, element){ $(element). ckeditor(); }); should be enough since . ckeditor has access to the item's id. element.
Thanks to these changes CKEditor 4 automatically works with the official jQuery Form Plugin for Ajax-based forms. It does not require any action from the developer's side to support it.
You can display data in ckeditor by passing the variable value which you get from the database.
use the CKEditor.editor.getData() call on the instance. That is to say:
HTML
<textarea id="my-editor"> <input id="send" type="button" value="Send">
JS for CKEditor 4.0.x
$('#send').click(function() { var value = CKEDITOR.instances['DOM-ID-HERE'].getData() // send your ajax request with value // profit! });
JS for CKEditor 3.6.x
var editor = CKEDITOR.editor.replace('my-editor'); $('#send').click(function() { var value = editor.getData(); // send your ajax request with value // profit! });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With