'use strict';(function(){tinymce.create('tinymce.plugins.Foswiki',{init:function(ed,url){ed.onInit.add(function(ed){ed.plugins.foswiki._fixAdvancedTheme(ed);if(ed.plugins.autosave&&!ed.settings.foswiki_no_autosave_fixup){ed.plugins.foswiki._fixAutoSave(ed);}});},_fixAdvancedTheme:function(ed){ed.theme._mceLink=function(ui,val){var ed=this.editor;ed.windowManager.open({url:tinymce.baseURL+'/themes/advanced/link.htm',width:360+parseInt(ed.getLang('advanced.link_delta_width',0),10),height:200+parseInt(ed.getLang('advanced.link_delta_height',0),10),inline:true},{theme_url:this.url});};},_disableAutoSaveOnBadIEs:function(ed){if(jQuery.browser.msie&&ed.plugins.autosave){ed.getElement().style.behavior="url('#default#userData')";if(typeof(ed.getElement().load)==='undefined'){ed.plugins.autosave.setupStorage=function(){};ed.plugins.autosave.removeDraft=function(){};ed.plugins.autosave.restoreDraft=function(){};ed.plugins.autosave.storeDraft=function(){};ed.onInit.add(function(ed){ed.controlManager.controls[ed.id+'_restoredraft'].remove();ed.controlManager.controls[ed.id+'_restoredraft'].destroy();});}}},_fixAutoSave:function(ed){var orig_id=ed.id;ed.id=FoswikiTiny.getFoswikiVar('WEB')+'.'+FoswikiTiny.getFoswikiVar('TOPIC');ed.id=ed.id.replace('/','.');ed.plugins.autosave.setupStorage(ed);ed.id=orig_id;return;},getInfo:function(){return{longname:'Foswiki plugin',author:'Foswiki Contributor',authorurl:'http://foswiki.org/System/ProjectContributor',infourl:'http://foswiki.org/Extensions/TinyMCEPlugin',version:'1.0'};}});tinymce.PluginManager.add('foswiki',tinymce.plugins.Foswiki);})();