summaryrefslogtreecommitdiff
path: root/public/javascripts/tiny_mce/plugins/autosave
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-02-17 21:54:39 +0100
committerhukl <contact@smyck.org>2009-02-17 21:54:39 +0100
commitf61b5b0597e0c25f084ee67d402f12a43a7a9947 (patch)
tree3b4c3f9f38637f1a7ecf703ece4fd3bc4c6e2934 /public/javascripts/tiny_mce/plugins/autosave
parent3d3b786cc43266f6292f5edd25733dbb9bd6ed06 (diff)
added tinymce editor for body area of pages
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/autosave')
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/autosave/editor_plugin.js1
-rwxr-xr-xpublic/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js51
2 files changed, 52 insertions, 0 deletions
diff --git a/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js b/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js
new file mode 100755
index 0000000..01a994e
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/autosave/editor_plugin.js
@@ -0,0 +1 @@
(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);})(); \ No newline at end of file
diff --git a/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js b/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js
new file mode 100755
index 0000000..3c4325a
--- /dev/null
+++ b/public/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js
@@ -0,0 +1,51 @@
1/**
2 * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
3 *
4 * @author Moxiecode
5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
6 */
7
8(function() {
9 tinymce.create('tinymce.plugins.AutoSavePlugin', {
10 init : function(ed, url) {
11 var t = this;
12
13 t.editor = ed;
14
15 window.onbeforeunload = tinymce.plugins.AutoSavePlugin._beforeUnloadHandler;
16 },
17
18 getInfo : function() {
19 return {
20 longname : 'Auto save',
21 author : 'Moxiecode Systems AB',
22 authorurl : 'http://tinymce.moxiecode.com',
23 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
24 version : tinymce.majorVersion + "." + tinymce.minorVersion
25 };
26 },
27
28 // Private plugin internal methods
29
30 'static' : {
31 _beforeUnloadHandler : function() {
32 var msg;
33
34 tinymce.each(tinyMCE.editors, function(ed) {
35 if (ed.getParam("fullscreen_is_enabled"))
36 return;
37
38 if (ed.isDirty()) {
39 msg = ed.getLang("autosave.unload_msg");
40 return false;
41 }
42 });
43
44 return msg;
45 }
46 }
47 });
48
49 // Register plugin
50 tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSavePlugin);
51})(); \ No newline at end of file