X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Flink%2Fplugin.js;h=e5b7044ec8b8a0ee53913db1af9fe931507789d8;hb=refs%2Ftags%2Fv3.5.3;hp=f0278ec20f0067237e58388dc9dba6b210ff1ef5;hpb=614511639979907ceb0da3614122a4d8eb963ad4;p=ckeditor.git diff --git a/_source/plugins/link/plugin.js b/_source/plugins/link/plugin.js index f0278ec..e5b7044 100644 --- a/_source/plugins/link/plugin.js +++ b/_source/plugins/link/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -30,6 +30,7 @@ CKEDITOR.plugins.add( 'link', CKEDITOR.dialog.add( 'anchor', this.path + 'dialogs/anchor.js' ); // Add the CSS styles for anchor placeholders. + var side = editor.lang.dir == 'rtl' ? 'right' : 'left'; editor.addCss( 'img.cke_anchor' + '{' + @@ -43,10 +44,10 @@ CKEDITOR.plugins.add( 'link', 'a.cke_anchor' + '{' + 'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/anchor.gif' ) + ');' + - 'background-position: 0 center;' + + 'background-position: ' + side + ' center;' + 'background-repeat: no-repeat;' + 'border: 1px solid #a9a9a9;' + - 'padding-left: 18px;' + + 'padding-' + side + ': 18px;' + '}' ); @@ -73,7 +74,7 @@ CKEDITOR.plugins.add( 'link', { 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' ) + else if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'anchor' ) evt.data.dialog = 'anchor'; } }); @@ -116,7 +117,7 @@ CKEDITOR.plugins.add( 'link', if ( !element || element.isReadOnly() ) return null; - var isAnchor = ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' ); + var isAnchor = ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'anchor' ); if ( !isAnchor ) {