(no commit message)
[atutor.git] / jscripts / tiny_mce / plugins / acheck / editor_plugin.js
1 (function(){tinymce.PluginManager.requireLangPack('acheck');tinymce.create('tinymce.plugins.AcheckPlugin',{init:function(ed,url){ed.addCommand('mceACheck',function(){var theCode='<html><body onLoad="document.accessform.submit();"> \n';theCode+='<h1>Submitting Code for Accessibility Checking.....</h1>\n';theCode+='<form action="http://checker.atrc.utoronto.ca/servlet/Checkacc" name="accessform" method="post"> \n';theCode+='<input type="hidden" name="guide" value="wcag-2-0-aaa.xml" /> \n';theCode+='<input type="hidden" name="type" value="form" /> \n';theCode+='<textarea name="edittext">'+tinyMCE.activeEditor.getContent({format:'raw'})+'</textarea>\n';theCode+='<input type="submit" /></form> \n';theCode+='</body></html> \n';accessWin=window.open('','accessWin','');accessWin.document.writeln(theCode);accessWin.document.close()});ed.addButton('acheck',{title:'acheck.desc',cmd:'mceACheck',image:url+'/img/acheck.gif'});ed.onNodeChange.add(function(ed,cm,n){cm.setActive('acheck',n.nodeName=='acheck')})},createControl:function(n,cm){return null},getInfo:function(){return{longname:'ACheck Plugin',author:'ATutor',authorurl:'http://www.atutor.ca',infourl:'http://www.atutor.ca',version:"1.0"}}});tinymce.PluginManager.add('acheck',tinymce.plugins.AcheckPlugin)})();