X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Flink%2Fplugin.js;h=f373eaf339f2caef828b4fc03254b651c8b97970;hp=26a8cb3be2ce39f9bd1c9b6e9242b785c87f3f41;hb=f8fc585c18d287eb325c575596d183122486b641;hpb=8665a7c6c60586526e32e8941fe2896739b6ebfb diff --git a/_source/plugins/link/plugin.js b/_source/plugins/link/plugin.js index 26a8cb3..f373eaf 100644 --- a/_source/plugins/link/plugin.js +++ b/_source/plugins/link/plugin.js @@ -65,6 +65,16 @@ CKEDITOR.plugins.add( 'link', command.setState( CKEDITOR.TRISTATE_DISABLED ); } ); + editor.on( 'doubleclick', function( evt ) + { + var element = CKEDITOR.plugins.link.getSelectedLink( editor ) || evt.data.element; + + if ( element.is( 'a' ) ) + evt.data.dialog = ( element.getAttribute( 'name' ) && !element.getAttribute( 'href' ) ) ? 'anchor' : 'link'; + else if ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' ) + evt.data.dialog = 'anchor'; + }); + // If the "menu" plugin is loaded, register the menu items. if ( editor.addMenuItems ) {