X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fimage%2Fplugin.js;h=6757aa37236df126f4f0b42e79e5b8c64bc79326;hb=e371ddf8abcb89013e20e6d0dd746adec344d0e5;hp=e6243b43c36e24ecb26f6f6a86d59e4eea8e85c9;hpb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1;p=ckeditor.git diff --git a/_source/plugins/image/plugin.js b/_source/plugins/image/plugin.js index e6243b4..6757aa3 100644 --- a/_source/plugins/image/plugin.js +++ b/_source/plugins/image/plugin.js @@ -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.getAttribute( '_cke_realelement' ) ) + 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.getAttribute( '_cke_realelement' ) || element.isReadOnly() ) return null; return { image : CKEDITOR.TRISTATE_OFF };