2 * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $
5 * @copyright Copyright © 2004-2007, Moxiecode Systems AB, All rights reserved.
8 /* Import plugin specific language pack */
9 tinyMCE.importPluginLanguagePack('autosave');
11 var TinyMCE_AutoSavePlugin = {
12 getInfo : function() {
14 longname : 'Auto save',
15 author : 'Moxiecode Systems AB',
16 authorurl : 'http://tinymce.moxiecode.com',
17 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
18 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
22 // Private plugin internal methods
24 _beforeUnloadHandler : function() {
25 var n, inst, anyDirty = false, msg = tinyMCE.getLang("lang_autosave_unload_msg");
27 if (tinyMCE.getParam("fullscreen_is_enabled"))
30 for (n in tinyMCE.instances) {
31 inst = tinyMCE.instances[n];
33 if (!tinyMCE.isInstance(inst))
44 window.onbeforeunload = TinyMCE_AutoSavePlugin._beforeUnloadHandler;
46 tinyMCE.addPlugin("autosave", TinyMCE_AutoSavePlugin);