//>>built
define("dojox/editor/plugins/ShowBlockNodes","dojo dijit dojox dijit/_editor/_Plugin dijit/form/Button dijit/form/ToggleButton dojo/_base/connect dojo/_base/declare dojo/i18n dojo/i18n!dojox/editor/plugins/nls/ShowBlockNodes".split(" "),function(b,g,m,n){var l=b.declare("dojox.editor.plugins.ShowBlockNodes",n,{useDefaultCommand:!1,iconClassPrefix:"dijitAdditionalEditorIcon",_styled:!1,_initButton:function(){var a=b.i18n.getLocalization("dojox.editor.plugins","ShowBlockNodes");this.button=new g.form.ToggleButton({label:a.showBlockNodes,
showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"ShowBlockNodes",tabIndex:"-1",onChange:b.hitch(this,"_showBlocks")});this.editor.addKeyHandler(b.keys.F9,!0,!0,b.hitch(this,this.toggle))},updateState:function(){this.button.set("disabled",this.get("disabled"))},setEditor:function(a){this.editor=a;this._initButton()},toggle:function(){this.button.set("checked",!this.button.get("checked"))},_showBlocks:function(a){var c=this.editor.document;if(!this._styled)try{this._styled=!0;var e=
"";b.forEach("div p ul ol table h1 h2 h3 h4 h5 h6 pre dir center blockquote form fieldset address object pre hr ins noscript li map button dd dt".split(" "),function(h){e+="@media screen {\n\t.editorShowBlocks {TAG} {\n\t\tbackground-image: url({MODURL}/images/blockelems/{TAG}.gif);\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: top left;\n\t\tborder-width: 1px;\n\t\tborder-style: dashed;\n\t\tborder-color: #D0D0D0;\n\t\tpadding-top: 15px;\n\t\tpadding-left: 15px;\n\t}\n}\n".replace(/\{TAG\}/gi,
h)});var d=b.moduleUrl(m._scopeName,"editor/plugins/resources").toString();if(!d.match(/^https?:\/\//i)&&!d.match(/^file:\/\//i)){var f="/"===d.charAt(0)?b.doc.location.protocol+"//"+b.doc.location.host:this._calcBaseUrl(b.global.location.href);"/"!==f[f.length-1]&&"/"!==d.charAt(0)&&(f+="/");d=f+d}e=e.replace(/\{MODURL\}/gi,d);if(b.isIE)c.createStyleSheet("").cssText=e;else{var k=c.createElement("style");k.appendChild(c.createTextNode(e));c.getElementsByTagName("head")[0].appendChild(k)}}catch(h){}a?
b.addClass(this.editor.editNode,"editorShowBlocks"):b.removeClass(this.editor.editNode,"editorShowBlocks")},_calcBaseUrl:function(a){var c=null;null!==a&&(c=a.indexOf("?"),-1!=c&&(a=a.substring(0,c)),c=a.lastIndexOf("/"),c=0<c&&c<a.length?a.substring(0,c):a);return c}});b.subscribe(g._scopeName+".Editor.getPlugin",null,function(a){a.plugin||"showblocknodes"!==a.args.name.toLowerCase()||(a.plugin=new l)});return l});