Ticket #5736: 5736.patch

File 5736.patch, 1.5 KB (added by Garry Yao, 14 years ago)
  • _source/plugins/link/dialogs/link.js

     
    12971297                                        ranges = selection.getRanges();
    12981298                                if ( ranges.length == 1 && ranges[0].collapsed )
    12991299                                {
    1300                                         var text = new CKEDITOR.dom.text( attributes._cke_saved_href, editor.document );
     1300                                        // Short mailto link text view (#5736).
     1301                                        var text = new CKEDITOR.dom.text( data.type == 'email' ?
     1302                                                        data.email.address : attributes._cke_saved_href, editor.document );
    13011303                                        ranges[0].insertNode( text );
    13021304                                        ranges[0].selectNodeContents( text );
    13031305                                        selection.selectRanges( ranges );
     
    13481350
    13491351                                element.setAttributes( attributes );
    13501352                                element.removeAttributes( removeAttributes );
    1351                                 // Update text view when user changes protocol #4612.
    1352                                 if (href == textView)
    1353                                         element.setHtml( attributes._cke_saved_href );
     1353                                // Update text view when user changes protocol (#4612).
     1354                                if ( href == textView || data.type == 'email' && textView.indexOf( '@' ) != -1 )
     1355                                {
     1356                                        // Short mailto link text view (#5736).
     1357                                        element.setHtml( data.type == 'email' ?
     1358                                                data.email.address : attributes._cke_saved_href );
     1359                                }
    13541360                                // Make the element display as an anchor if a name has been set.
    13551361                                if ( element.getAttribute( 'name' ) )
    13561362                                        element.addClass( 'cke_anchor' );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy