So I have an editor instance:
window.onload = function() { myEditor = CKEDITOR.replace( 'message', { toolbar : 'MyToolbar', height: '200', width: '700', resize_enabled: false }); };
I have an image that I want to manually add to the editor like so:
myEditor.insertHtml('<img src=\"' + imageURL + '\">');
The URL is of the format http://localhost/.../image.jpeg
Using IE8 I have no problem doing this. I'm using Firefox 3.5.3, on the other hand, is totally unpredictable. Sometimes the image shows. Sometimes it only shows the broken image icon (the piece of paper ripped in half). If I refresh the page, it's a toss up if it works or not. Looking at the source code, the value of my text area is always the same. My image exists, the code is correctly pointing to it, but the image will not always show.
Some other weird stuff...
Using the demo editor on CKEditor website, I have no problem loading images in Firefox. I've also noticed that when I put in a URL for an image outside my server, I have no problems loading. The only time images load unpredictably is when the url is on the localhost.
Has anybody else dealt with this problem or faced something similar? I have a feeling this might be a problem with my server, but I'm at the end of my rope. I really need some ideas what this might be.