Skip to content

Instantly share code, notes, and snippets.

@aaronrussell
Created March 22, 2010 14:19
Show Gist options
  • Save aaronrussell/340113 to your computer and use it in GitHub Desktop.
Save aaronrussell/340113 to your computer and use it in GitHub Desktop.
CKEDITOR.plugins.add('uploader',{
init:function(a){
var cmd = a.addCommand('uploader', {exec:uploader_onclick});
cmd.modes={wysiwyg:1,source:1};
cmd.canUndo=false;
a.ui.addButton('uploader',{ label:'Upload an Image..', command:'uploader', icon:this.path+'images/icon.gif' });
}
})
function uploader_onclick(e)
{
$.modal('<iframe src="/photos" height="480" width="640" style="border:0">',{
containerCss:{
backgroundColor:'#fff',
padding:0
},
overlayClose:true
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment