--- /dev/null
+/*\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+/**\r
+ * @file Image plugin\r
+ */\r
+\r
+CKEDITOR.plugins.add( 'image',\r
+{\r
+ init : function( editor )\r
+ {\r
+ var pluginName = 'image';\r
+\r
+ // Register the dialog.\r
+ CKEDITOR.dialog.add( pluginName, this.path + 'dialogs/image.js' );\r
+\r
+ // Register the command.\r
+ editor.addCommand( pluginName, new CKEDITOR.dialogCommand( pluginName ) );\r
+\r
+ // Register the toolbar button.\r
+ editor.ui.addButton( 'Image',\r
+ {\r
+ label : editor.lang.common.image,\r
+ command : pluginName\r
+ });\r
+\r
+ editor.on( 'doubleclick', function( evt )\r
+ {\r
+ var element = evt.data.element;\r
+\r
+ if ( element.is( 'img' ) && !element.data( 'cke-realelement' ) && !element.isReadOnly() )\r
+ evt.data.dialog = 'image';\r
+ });\r
+\r
+ // If the "menu" plugin is loaded, register the menu items.\r
+ if ( editor.addMenuItems )\r
+ {\r
+ editor.addMenuItems(\r
+ {\r
+ image :\r
+ {\r
+ label : editor.lang.image.menu,\r
+ command : 'image',\r
+ group : 'image'\r
+ }\r
+ });\r
+ }\r
+\r
+ // If the "contextmenu" plugin is loaded, register the listeners.\r
+ if ( editor.contextMenu )\r
+ {\r
+ editor.contextMenu.addListener( function( element, selection )\r
+ {\r
+ if ( !element || !element.is( 'img' ) || element.data( 'cke-realelement' ) || element.isReadOnly() )\r
+ return null;\r
+\r
+ return { image : CKEDITOR.TRISTATE_OFF };\r
+ });\r
+ }\r
+ }\r
+} );\r
+\r
+/**\r
+ * Whether to remove links when emptying the link URL field in the image dialog.\r
+ * @type Boolean\r
+ * @default true\r
+ * @example\r
+ * config.image_removeLinkByEmptyURL = false;\r
+ */\r
+CKEDITOR.config.image_removeLinkByEmptyURL = true;\r
+\r
+/**\r
+ * Padding text to set off the image in preview area.\r
+ * @name CKEDITOR.config.image_previewText\r
+ * @type String\r
+ * @default "Lorem ipsum dolor..." placehoder text.\r
+ * @example\r
+ * config.image_previewText = CKEDITOR.tools.repeat( '___ ', 100 );\r
+ */\r