Ticket #5736: 5736.patch
File 5736.patch, 1.5 KB (added by , 13 years ago) |
---|
-
_source/plugins/link/dialogs/link.js
1297 1297 ranges = selection.getRanges(); 1298 1298 if ( ranges.length == 1 && ranges[0].collapsed ) 1299 1299 { 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 ); 1301 1303 ranges[0].insertNode( text ); 1302 1304 ranges[0].selectNodeContents( text ); 1303 1305 selection.selectRanges( ranges ); … … 1348 1350 1349 1351 element.setAttributes( attributes ); 1350 1352 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 } 1354 1360 // Make the element display as an anchor if a name has been set. 1355 1361 if ( element.getAttribute( 'name' ) ) 1356 1362 element.addClass( 'cke_anchor' );