/*
 * Base64Image Plugin for CKEditor (http://github.com/nmmf/base64image)
 * Created by ALL-INKL.COM - Neue Medien M�nnich - 04. Feb 2014
 * Licensed under the terms of GPL, LGPL and MPL licenses.
 */
CKEDITOR.plugins.add("base64image", {
	requires: 	"dialog",
	icons	:	"base64image",
	hidpi	:	true,
    init	: 	function(editor){
					var pluginName = 'base64imageDialog';
					
					editor.ui.addButton("base64image", {
						label: "Upload image",
						command: pluginName,
						toolbar: "insert"
					});
					CKEDITOR.dialog.add(pluginName, this.path+"dialogs/base64image.js");
					
					editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName) );
					if(editor.addMenuItem) {
						editor.addMenuGroup("base64imageGroup");
						editor.addMenuItem("base64imageItem", {
							label: "Upload image",
							icon: this.path+"icons/base64image.png",
							command: pluginName,
							group: "base64imageGroup"
						});
					}
				}
});
