I have tried to insert an uploaded image in to the CKEditor by using the following code,
var editor = CKEDITOR.instances.writearticle;
var value = '<img src="images/imagename.jpg">';
editor.insertHtml( value );
But this does not work. But when I try the same logic with this code
var editor = CKEDITOR.instances.writearticle;
var value = '<strong>Hello World</strong>';
editor.insertHtml( value );
Hello world as bold text is inserted. Why it is not working for the <img>
tag?
I have found this procedure here and <img>
insertion works in this site. What is the problem in my site?