tinymce.create("tinymce.plugins.VisualChars",{init:function(e,t){var a=this;a.editor=e,e.addCommand("mceVisualChars",a._toggleVisualChars,a),e.addButton("visualchars",{title:"visualchars.desc",cmd:"mceVisualChars"}),e.onBeforeGetContent.add((function(e,t){a.state&&"raw"!=t.format&&!t.draft&&(a.state=!0,a._toggleVisualChars(!1))}))},getInfo:function(){return{longname:"Visual characters",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/visualchars",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_toggleVisualChars:function(e){var t,a,o,s,i,n=this,r=n.editor,c=(r.getDoc(),r.getBody()),l=r.selection;if(n.state=!n.state,r.controlManager.setActive("visualchars",n.state),e&&(i=l.getBookmark()),n.state)for(t=[],tinymce.walk(c,(function(e){3==e.nodeType&&e.nodeValue&&-1!=e.nodeValue.indexOf(" ")&&t.push(e)}),"childNodes"),a=0;a<t.length;a++){for(o=(o=t[a].nodeValue).replace(/(\u00a0)/g,'<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp">$1</span>'),s=r.dom.create("div",null,o);node=s.lastChild;)r.dom.insertAfter(node,t[a]);r.dom.remove(t[a])}else for(a=(t=r.dom.select("span.mceItemNbsp",c)).length-1;a>=0;a--)r.dom.remove(t[a],1);l.moveToBookmark(i)}}),tinymce.PluginManager.add("visualchars",tinymce.plugins.VisualChars);
