X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Flink%2Fplugin.js;h=f0278ec20f0067237e58388dc9dba6b210ff1ef5;hp=3cdc6fb8e699a428ae224c3d437019068ff49012;hb=614511639979907ceb0da3614122a4d8eb963ad4;hpb=039a051ccf3901311661022a30afd60fc38130c9 diff --git a/_source/plugins/link/plugin.js b/_source/plugins/link/plugin.js index 3cdc6fb..f0278ec 100644 --- a/_source/plugins/link/plugin.js +++ b/_source/plugins/link/plugin.js @@ -69,10 +69,13 @@ CKEDITOR.plugins.add( 'link', { var element = CKEDITOR.plugins.link.getSelectedLink( editor ) || evt.data.element; - 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' ) - evt.data.dialog = 'anchor'; + if ( !element.isReadOnly() ) + { + 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' ) + evt.data.dialog = 'anchor'; + } }); // If the "menu" plugin is loaded, register the menu items.