CKEDITOR.plugins.add("devtools",{lang:["en","bg","cs","cy","da","de","el","eo","et","fa","fi","fr","gu","he","hr","it","ku","nb","nl","no","pl","pt-br","sk","tr","ug","uk","vi","zh-cn"],init:function(b){b._.showDialogDefinitionTooltips=1},onLoad:function(){CKEDITOR.document.appendStyleText(CKEDITOR.config.devtools_styles||"#cke_tooltip { padding: 5px; border: 2px solid #333; background: #ffffff }#cke_tooltip h2 { font-size: 1.1em; border-bottom: 1px solid; margin: 0; padding: 1px; }#cke_tooltip ul { padding: 0pt; list-style-type: none; }")}});(function(){function e(n,m,l,k){var c=n.lang.devTools,b='<a href="http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.dialog.definition.'+(l?l.type=="text"?"textInput":l.type:"content")+'.html" target="_blank">'+(l?l.type:"content")+"</a>",a="<h2>"+c.title+"</h2><ul><li><strong>"+c.dialogName+"</strong> : "+m.getName()+"</li><li><strong>"+c.tabName+"</strong> : "+k+"</li>";if(l){a+="<li><strong>"+c.elementId+"</strong> : "+l.id+"</li>"}a+="<li><strong>"+c.elementType+"</strong> : "+b+"</li>";return a+"</ul>"}function d(r,q,p,o,n,m){var c=q.getDocumentPosition(),b={"z-index":CKEDITOR.dialog._.currentZIndex+10,top:c.y+q.getSize("height")+"px"};f.setHtml(r(p,o,n,m));f.show();if(p.lang.dir=="rtl"){var a=CKEDITOR.document.getWindow().getViewPaneSize();b.right=a.width-c.x-q.getSize("width")+"px"}else{b.left=c.x+"px"}f.setStyles(b)}var f;CKEDITOR.on("reset",function(){f&&f.remove();f=null});CKEDITOR.on("dialogDefinition",function(h){var c=h.editor;if(c._.showDialogDefinitionTooltips){if(!f){f=CKEDITOR.dom.element.createFromHtml('<div id="cke_tooltip" tabindex="-1" style="position: absolute"></div>',CKEDITOR.document);f.hide();f.on("mouseover",function(){this.show()});f.on("mouseout",function(){this.hide()});f.appendTo(CKEDITOR.document.getBody())}var b=h.data.definition.dialog,a=c.config.devtools_textCallback||e;b.on("load",function(){var n=b.parts.tabs.getChildren(),m;for(var l=0,g=n.count();l<g;l++){m=n.getItem(l);m.on("mouseover",function(){var i=this.$.id;d(a,this,c,b,null,i.substring(4,i.lastIndexOf("_")))});m.on("mouseout",function(){f.hide()})}b.foreach(function(j){if(j.type in {hbox:1,vbox:1}){return}var i=j.getElement();if(i){i.on("mouseover",function(){d(a,this,c,b,j,b._.currentTabId)});i.on("mouseout",function(){f.hide()})}})})}})})();