Hello,
I've used CKEditor in my project, and the editor works perfectly. The only question is how to load my datas into the editor using jQuery.ajax().
Here's anexample of XML file generated at server side:
And the jQuery source that I've used for data loading:
It seems that jQuery is confused about all thoses HTML and XML tags. The variable content is always empty.
So I'd like to know if there's a better way for receiving datas using AJAX.
Thanks alot.
I've used CKEditor in my project, and the editor works perfectly. The only question is how to load my datas into the editor using jQuery.ajax().
Here's anexample of XML file generated at server side:
<response> <title>image test</title> <comment>1</comment> <column>1</column> <content> <p> <img alt="" src="/xsaop2/media/images/image_02.jpg" style="width: 800px; height: 600px;"/> </p> </content> </response>
And the jQuery source that I've used for data loading:
$.ajax({ ... ... dataType: "xml", success: function(data){ ... ... ... ... var content = $(data).find('content').text(); CKEDITOR.instances['articleEditor'].setData(content); } });
It seems that jQuery is confused about all thoses HTML and XML tags. The variable content is always empty.
So I'd like to know if there's a better way for receiving datas using AJAX.
Thanks alot.