Sha256: 208a1e83094182a67b0dd89ecef826c008aa7f758ad655fb702b5e95f42186fc
Contents?: true
Size: 1.77 KB
Versions: 7
Compression:
Stored size: 1.77 KB
Contents
CKEDITOR.dialog.add("esp_anchor",function(b){var c=function(d){this._.selectedElement=d;var e=d.data("cke-saved-name");this.setValueOf("info","txtName",e||"")};function a(e,d){return e.createFakeElement(d,"cke_anchor","anchor")}return{title:b.lang.anchor.title,minWidth:300,minHeight:60,onOk:function(){var g=this.getValueOf("info","txtName");var e={name:g,"data-cke-saved-name":g};if(this._.selectedElement){if(this._.selectedElement.data("cke-realelement")){var j=a(b,b.document.createElement("a",{attributes:e}));j.replace(this._.selectedElement)}else{this._.selectedElement.setAttributes(e)}}else{var i=b.getSelection(),d=i&&i.getRanges()[0];if(d.collapsed){if(CKEDITOR.plugins.link.synAnchorSelector){e["class"]="cke_anchor_empty"}if(CKEDITOR.plugins.link.emptyAnchorFix){e.contenteditable="false";e["data-cke-editable"]=1}var f=b.document.createElement("a",{attributes:e});if(CKEDITOR.plugins.link.fakeAnchor){f=a(b,f)}d.insertNode(f)}else{if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){e["class"]="cke_anchor"}var h=new CKEDITOR.style({element:"a",attributes:e});h.type=CKEDITOR.STYLE_INLINE;h.apply(b.document)}}},onHide:function(){delete this._.selectedElement},onShow:function(){var f=b.getSelection(),g=f.getSelectedElement(),d;if(g){if(CKEDITOR.plugins.link.fakeAnchor){var e=CKEDITOR.plugins.link.tryRestoreFakeAnchor(b,g);e&&c.call(this,e);this._.selectedElement=g}else{if(g.is("a")&&g.hasAttribute("name")){c.call(this,g)}}}else{d=CKEDITOR.plugins.link.getSelectedLink(b);if(d){c.call(this,d);f.selectElement(d)}}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:b.lang.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:b.lang.anchor.name,required:true,validate:function(){if(!this.getValue()){alert(b.lang.anchor.errorName);return false}return true}}]}]}});
Version data entries
7 entries across 7 versions & 1 rubygems