X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fimage%2Fplugin.js;h=7285b0fade645479550663ad4abd805e8302e4e9;hb=4e90e78dc97789709ee7404359a5517540c27553;hp=09b72c4e7c617ed70c3e5402cd30e9ed1ea47665;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91;p=ckeditor.git diff --git a/_source/plugins/image/plugin.js b/_source/plugins/image/plugin.js index 09b72c4..7285b0f 100644 --- a/_source/plugins/image/plugin.js +++ b/_source/plugins/image/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -26,6 +26,14 @@ CKEDITOR.plugins.add( 'image', command : pluginName }); + editor.on( 'doubleclick', function( evt ) + { + var element = evt.data.element; + + if ( element.is( 'img' ) && !element.data( 'cke-realelement' ) && !element.isReadOnly() ) + evt.data.dialog = 'image'; + }); + // If the "menu" plugin is loaded, register the menu items. if ( editor.addMenuItems ) { @@ -45,7 +53,7 @@ CKEDITOR.plugins.add( 'image', { editor.contextMenu.addListener( function( element, selection ) { - if ( !element || !element.is( 'img' ) || element.getAttribute( '_cke_realelement' ) ) + if ( !element || !element.is( 'img' ) || element.data( 'cke-realelement' ) || element.isReadOnly() ) return null; return { image : CKEDITOR.TRISTATE_OFF }; @@ -62,3 +70,12 @@ CKEDITOR.plugins.add( 'image', * config.image_removeLinkByEmptyURL = false; */ CKEDITOR.config.image_removeLinkByEmptyURL = true; + +/** + * Padding text to set off the image in preview area. + * @name CKEDITOR.config.image_previewText + * @type String + * @default "Lorem ipsum dolor..." placehoder text. + * @example + * config.image_previewText = CKEDITOR.tools.repeat( '___ ', 100 ); + */