I have problems with the CKEditor 4 and hope that someone can help me.
I have a textarea (#target) -> an by clicking on different links i´m loading different html code in it with ajax. All is working fine, so i´wanted to change the textarea to ckeditor.
window.onload = function() {
CKEDITOR.replace('target');
};
no problem here either.
But when i wanted to change the conted by clicking on "textarea changing links" the ckeditor doesn´t display it. I can see in DOM that the none displayed textarea is still changing its content.
Google tells me previous solutions like :
for ( var target in CKEDITOR.instances ){
CKEDITOR.instances.target.updateElement();
}
But this didn´t work for me too. It only updates the hidden #target not (the other way) the content in the editor.
How to update the content with ajax?
Has anybody an idea?
Marcel
Solved
Solved for me.
I solved it with help of this:
Have a look at http://rev.ckeditor.com/ckeditor/trunk/7664/_samples/ajax.html
But u also need to destroy all instances!!