(function(){tinymce.PluginManager.requireLangPack("moodlenolink");tinymce.create("tinymce.plugins.moodlenolinkPlugin",{init:function(a,b){a.addCommand("mcemoodlenolink",function(){var d,c;d=a.selection.getNode();c=a.dom.getParent(d,function(e){return a.dom.getAttrib(e,"class")=="nolink"});if(c){a.dom.remove(c,true)}else{a.selection.setContent('<span class="nolink">'+a.selection.getContent()+"</span>")}});a.addButton("moodlenolink",{title:"moodlenolink.desc",cmd:"mcemoodlenolink",image:b+"/img/ed_nolink.gif"});a.onNodeChange.add(function(e,d,h){var f,g;g=d.get("moodlenolink");f=e.dom.getParent(h,"SPAN");g.setActive(f&&e.dom.hasClass(f,"nolink"));if(f&&e.dom.hasClass(f,"nolink")||e.selection.getContent()){g.setDisabled(false)}else{g.setDisabled(true)}})},getInfo:function(){return{longname:"moodlenolink plugin",author:"Mathieu Petit-Clair",authorurl:"http://moodle.com/hq",infourl:"http://docs.moodle.org/en/TinyMCE",version:"1.0"}}});tinymce.PluginManager.add("moodlenolink",tinymce.plugins.moodlenolinkPlugin)
})();