X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=plugins%2Flink%2Fdialogs%2Fanchor.js;h=562417a6901fe755a0037ef6c26ca2acd94de630;hp=4c5153ce1f41d56cf964eabdfeb8454b09cc3896;hb=26ea9b471a69b563dfa9fb7c9c8d97db8e56de0e;hpb=53700a2c9aa44599d0a74cb0e0b5e5fbdead0fcd diff --git a/plugins/link/dialogs/anchor.js b/plugins/link/dialogs/anchor.js index 4c5153c..562417a 100644 --- a/plugins/link/dialogs/anchor.js +++ b/plugins/link/dialogs/anchor.js @@ -1,6 +1,6 @@ /* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. - For licensing, see LICENSE.html or http://ckeditor.com/license + For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.dialog.add("anchor",function(c){var d=function(a){this._.selectedElement=a;this.setValueOf("info","txtName",a.data("cke-saved-name")||"")};return{title:c.lang.link.anchor.title,minWidth:300,minHeight:60,onOk:function(){var a=CKEDITOR.tools.trim(this.getValueOf("info","txtName")),a={id:a,name:a,"data-cke-saved-name":a};if(this._.selectedElement)this._.selectedElement.data("cke-realelement")?(a=c.document.createElement("a",{attributes:a}),c.createFakeElement(a,"cke_anchor","anchor").replace(this._.selectedElement)): this._.selectedElement.setAttributes(a);else{var b=c.getSelection(),b=b&&b.getRanges()[0];b.collapsed?(CKEDITOR.plugins.link.synAnchorSelector&&(a["class"]="cke_anchor_empty"),CKEDITOR.plugins.link.emptyAnchorFix&&(a.contenteditable="false",a["data-cke-editable"]=1),a=c.document.createElement("a",{attributes:a}),CKEDITOR.plugins.link.fakeAnchor&&(a=c.createFakeElement(a,"cke_anchor","anchor")),b.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",