I'm using CKEditor to change my textareas into a wysiwyg. It all works fine, except when i load content through an Ajax call. Then my CKEditor doesn't load.
I've searched for a solution, but couldn't find any that worked for me.
My Ajax call basically looks like this:
$.ajax({
type: "POST",
url: url,
success: function(data) {
$('#content').html(data);
$('.ckeditor').ckeditor();
}
});
As you can see i tried to use the function ckeditor() to programmatically load the CKEditor. But this gives me the following error:
FireFox says:
$(".ckeditor").ckeditor is not a function
And IE says:
Object doesn't support property or method 'ckeditor'
Is there any other way to load the CKEditor by class name when the content is loaded through an Ajax call??
$(document).readyor did you place your js snippet without the document-ready callback function at the very end of the script? - Istiaque Ahmed