Ticket #635: 635_5.patch

File 635_5.patch, 2.5 KB (added by Minh Nguyen, 14 years ago)
  • _source/plugins/image/plugin.js

     
    2525                                label : editor.lang.common.image,
    2626                                command : pluginName
    2727                        });
     28               
     29                editor.on( 'doubleclick', function( evt )
     30                        {
     31                                var element = evt.data.element,
     32                                        realElement = element.getAttribute( '_cke_real_element_type' );
     33                               
     34                                if ( element.is( 'img' ) )
     35                                        evt.data.dialog =  realElement ? realElement : 'image';
     36                        });
    2837
    2938                // If the "menu" plugin is loaded, register the menu items.
    3039                if ( editor.addMenuItems )
  • _source/plugins/link/plugin.js

     
    5151                        );
    5252
    5353                // Register selection change handler for the unlink button.
    54                  editor.on( 'selectionChange', function( evt )
     54                editor.on( 'selectionChange', function( evt )
    5555                        {
    5656                                /*
    5757                                 * Despite our initial hope, document.queryCommandEnabled() does not work
     
    6464                                else
    6565                                        command.setState( CKEDITOR.TRISTATE_DISABLED );
    6666                        } );
    67 
     67                       
     68                editor.on( 'doubleclick', function( evt )
     69                        {
     70                                var element = CKEDITOR.plugins.link.getSelectedLink( editor ) || evt.data.element;
     71                               
     72                                if ( element.is( 'a' ) )
     73                                        evt.data.dialog =  ( element.getAttribute( 'name' ) && !element.getAttribute( 'href' ) ) ? 'anchor' : 'link';
     74                        });
     75                       
    6876                // If the "menu" plugin is loaded, register the menu items.
    6977                if ( editor.addMenuItems )
    7078                {
  • _source/plugins/wysiwygarea/plugin.js

     
    383383
    384384                                                domWindow       = editor.window         = new CKEDITOR.dom.window( domWindow );
    385385                                                domDocument     = editor.document       = new CKEDITOR.dom.document( domDocument );
     386                                               
     387                                                domDocument.on( 'dblclick', function( ev )
     388                                                {
     389                                                        var element = ev.data.getTarget(),
     390                                                                data = { element : element, dialog : '' };
     391                                                        editor.fire( 'doubleclick', data );
     392                                                        data.dialog && editor.openDialog( data.dialog );
     393                                                });
    386394
    387395                                                // Gecko/Webkit need some help when selecting control type elements. (#3448)
    388396                                                if ( !( CKEDITOR.env.ie || CKEDITOR.env.opera) )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy