Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
ckeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vanilla ckeditor-3.4b
[ckeditor.git]
/
_source
/
plugins
/
link
/
dialogs
/
link.js
diff --git
a/_source/plugins/link/dialogs/link.js
b/_source/plugins/link/dialogs/link.js
index
4ac6766
..
ed24860
100644
(file)
--- a/
_source/plugins/link/dialogs/link.js
+++ b/
_source/plugins/link/dialogs/link.js
@@
-411,13
+411,13
@@
CKEDITOR.dialog.add( 'link', function( editor )
type : 'select',
\r
label : editor.lang.common.protocol,
\r
'default' : 'http://',
\r
type : 'select',
\r
label : editor.lang.common.protocol,
\r
'default' : 'http://',
\r
- style : 'width : 100%;',
\r
items :
\r
[
\r
items :
\r
[
\r
- [ 'http://' ],
\r
- [ 'https://' ],
\r
- [ 'ftp://' ],
\r
- [ 'news://' ],
\r
+ // Force 'ltr' for protocol names in BIDI. (#5433)
\r
+ [ 'http://\u200E', 'http://' ],
\r
+ [ 'https://\u200E', 'https://' ],
\r
+ [ 'ftp://\u200E', 'ftp://' ],
\r
+ [ 'news://\u200E', 'news://' ],
\r
[ editor.lang.link.other , '' ]
\r
],
\r
setup : function( data )
\r
[ editor.lang.link.other , '' ]
\r
],
\r
setup : function( data )
\r
@@
-1294,10
+1294,12
@@
CKEDITOR.dialog.add( 'link', function( editor )
{
\r
// Create element if current selection is collapsed.
\r
var selection = editor.getSelection(),
\r
{
\r
// Create element if current selection is collapsed.
\r
var selection = editor.getSelection(),
\r
- ranges = selection.getRanges();
\r
+ ranges = selection.getRanges( true );
\r
if ( ranges.length == 1 && ranges[0].collapsed )
\r
{
\r
if ( ranges.length == 1 && ranges[0].collapsed )
\r
{
\r
- var text = new CKEDITOR.dom.text( attributes._cke_saved_href, editor.document );
\r
+ // Short mailto link text view (#5736).
\r
+ var text = new CKEDITOR.dom.text( data.type == 'email' ?
\r
+ data.email.address : attributes._cke_saved_href, editor.document );
\r
ranges[0].insertNode( text );
\r
ranges[0].selectNodeContents( text );
\r
selection.selectRanges( ranges );
\r
ranges[0].insertNode( text );
\r
ranges[0].selectNodeContents( text );
\r
selection.selectRanges( ranges );
\r
@@
-1348,9
+1350,13
@@
CKEDITOR.dialog.add( 'link', function( editor )
\r
element.setAttributes( attributes );
\r
element.removeAttributes( removeAttributes );
\r
\r
element.setAttributes( attributes );
\r
element.removeAttributes( removeAttributes );
\r
- // Update text view when user changes protocol #4612.
\r
- if (href == textView)
\r
- element.setHtml( attributes._cke_saved_href );
\r
+ // Update text view when user changes protocol (#4612).
\r
+ if ( href == textView || data.type == 'email' && textView.indexOf( '@' ) != -1 )
\r
+ {
\r
+ // Short mailto link text view (#5736).
\r
+ element.setHtml( data.type == 'email' ?
\r
+ data.email.address : attributes._cke_saved_href );
\r
+ }
\r
// Make the element display as an anchor if a name has been set.
\r
if ( element.getAttribute( 'name' ) )
\r
element.addClass( 'cke_anchor' );
\r
// Make the element display as an anchor if a name has been set.
\r
if ( element.getAttribute( 'name' ) )
\r
element.addClass( 'cke_anchor' );
\r