Firstly, I have made it into a drop down list of images, that's no problem. You can insert them fine, also.
The only area I have having difficulty is making the image appear in the preview box. The code I currently have is:
id:'textUrl', type:'select', label:'', items:[ ['Google','http://www.google.co.uk/intl/en_uk/images/logo.gif'], ['Yahoo','http://l.yimg.com/a/i/ww/met/yahoo_logo_us_061509.png'] ], onChange:function(){ var t=CKEDITOR.document.getById('previewImage'); var q=this.getDialog(); r=this.getValue(); if(r.length>0){ q=this.getDialog(); var s=q.originalElement; s.setCustomData('isReady','false'); var t=CKEDITOR.document.getById('ImagePreviewLoader'); if(t){ t.setStyle('display',''); } s.on('load',o,q); s.on('error',p,q); s.on('abort',p,q); s.setAttribute('src',r); q.preview.setAttribute('src',r); h(q); } },
Re: Replacing the image URL field with a drop down