From 689ee9c7ea48c2e3de8790dcaae4500207567508 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 3 Apr 2016 03:56:46 -0400 Subject: add ckeditor --- data/stuff/ckeditor-4.5.8-custom/plugins/link/dialogs/anchor.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/stuff/ckeditor-4.5.8-custom/plugins/link/dialogs/anchor.js (limited to 'data/stuff/ckeditor-4.5.8-custom/plugins/link/dialogs/anchor.js') diff --git a/data/stuff/ckeditor-4.5.8-custom/plugins/link/dialogs/anchor.js b/data/stuff/ckeditor-4.5.8-custom/plugins/link/dialogs/anchor.js new file mode 100644 index 0000000..63372eb --- /dev/null +++ b/data/stuff/ckeditor-4.5.8-custom/plugins/link/dialogs/anchor.js @@ -0,0 +1,7 @@ +/* + Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. + For licensing, see LICENSE.md or http://ckeditor.com/license +*/ +CKEDITOR.dialog.add("anchor",function(c){function d(a,b){return a.createFakeElement(a.document.createElement("a",{attributes:b}),"cke_anchor","anchor")}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=d(c,a),a.replace(this._.selectedElement),CKEDITOR.env.ie&&c.getSelection().selectElement(a)): +this._.selectedElement.setAttributes(a);else{var b=c.getSelection(),b=b&&b.getRanges()[0];b.collapsed?(a=d(c,a),b.insertNode(a)):(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(a["class"]="cke_anchor"),a=new CKEDITOR.style({element:"a",attributes:a}),a.type=CKEDITOR.STYLE_INLINE,c.applyStyle(a))}},onHide:function(){delete this._.selectedElement},onShow:function(){var a=c.getSelection(),b=a.getSelectedElement(),d=b&&b.data("cke-realelement"),e=d?CKEDITOR.plugins.link.tryRestoreFakeAnchor(c,b):CKEDITOR.plugins.link.getSelectedLink(c); +if(e){this._.selectedElement=e;var f=e.data("cke-saved-name");this.setValueOf("info","txtName",f||"");!d&&a.selectElement(e);b&&(this._.selectedElement=b)}this.getContentElement("info","txtName").focus()},contents:[{id:"info",label:c.lang.link.anchor.title,accessKey:"I",elements:[{type:"text",id:"txtName",label:c.lang.link.anchor.name,required:!0,validate:function(){return this.getValue()?!0:(alert(c.lang.link.anchor.errorName),!1)}}]}]}}); \ No newline at end of file -- cgit v1.2.3