app/tiny_mce/plugins/autosave/editor_plugin.js
author Todd Larsen <tlarsen@google.com>
Sat, 18 Oct 2008 04:56:39 +0000
changeset 376 ce8b3a9fa0de
parent 154 d2377425d3f2
permissions -rwxr-xr-x
Add a style that appears in form error lists produced by Django Forms and make it match the style of the existing td.formfielderror used by the field_as_table_row helper. Patch by: Todd Larsen Review by: to-be-reviewed

(function(){tinymce.create('tinymce.plugins.AutoSavePlugin',{init:function(ed,url){var t=this;t.editor=ed;window.onbeforeunload=tinymce.plugins.AutoSavePlugin._beforeUnloadHandler;},getInfo:function(){return{longname:'Auto save',author:'Moxiecode Systems AB',authorurl:'http://tinymce.moxiecode.com',infourl:'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',version:tinymce.majorVersion+"."+tinymce.minorVersion};},'static':{_beforeUnloadHandler:function(){var msg;tinymce.each(tinyMCE.editors,function(ed){if(ed.getParam("fullscreen_is_enabled"))return;if(ed.isDirty()){msg=ed.getLang("autosave.unload_msg");return false;}});return msg;}}});tinymce.PluginManager.add('autosave',tinymce.plugins.AutoSavePlugin);})();