1CKEDITOR.plugins.add("footnote",{init:function(b){b.addCommand("footnoteDialog",new CKEDITOR.dialogCommand("footnoteDialog"));var d=b.lang.footnote;if(!d){d=CKEDITOR.lang["default"]["footnote"]}else{var c=CKEDITOR.lang["default"]["footnote"];for(var a in c){if(!d[a]){d[a]=c[a]}}}if(!oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj){oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj=new Object();oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes=new Array();oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.count=0}b.ui.addButton("Footnotes",{label:d.ToolTip,command:"footnoteDialog",icon:this.path+"images/footnote.png"});CKEDITOR.dialog.add("footnoteDialog",function(e){return{title:d.Title,minWidth:400,minHeight:200,fontSize:"14pt",onShow:function(){},contents:[{id:"general",label:d.Settings,elements:[{type:"html",html:d.Header,},{type:"textarea",id:"contents",label:d.Label_1,validate:CKEDITOR.dialog.validate.notEmpty(d.Validate),commit:function(f){f.contents=this.getValue()},},{type:"hbox",id:"revisions",widths:["15%","30%","2%","53%"],children:[{type:"html",html:d.Label_2,},{type:"text",id:"noteId",maxLength:"9",commit:function(f){f.noteId=this.getValue()},onChange:function(f){},},{type:"html",html:"  ",},{type:"button",label:d.LoadButtonLabel,id:"id3",onClick:function(){var h=this.getDialog();var i=h.getContentElement("general","noteId").getInputElement().$.id;var f=document.getElementById(i).value;if(f){if(oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[f]){var i=h.getContentElement("general","contents").getInputElement().$.id;var g=document.getElementById(i);g.value=oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[f]}}},}]},]},{id:"info",label:"Info",elements:[{type:"html",html:d.FootNoteInfo,},]},],onOk:function(){var i=this,j={},h=e.document.createElement("sup");this.commitContent(j);if(j.noteId){oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[j.noteId]=j.contents;return}h.setAttribute("class","dwfcknote ");var g=++oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.count;var f="fckgL"+g;h.setAttribute("class","dwfcknote "+f);oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[f]=j.contents;h.setHtml(f);e.insertElement(h)}}})}});