-/*\r
- * Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.\r
+/**\r
+ * editor_plugin_src.js\r
+ *\r
+ * Copyright 2009, Moxiecode Systems AB\r
+ * Released under LGPL License.\r
+ *\r
+ * License: http://tinymce.moxiecode.com/license\r
+ * Contributing: http://tinymce.moxiecode.com/contributing\r
*/\r
\r
(function() {\r
_setContent : function(ed, o) {\r
var t = this, sp, ep, c = o.content, v, st = '';\r
\r
+ // Ignore raw updated if we already have a head, this will fix issues with undo/redo keeping the head/foot separate\r
+ if (o.format == 'raw' && t.head)\r
+ return;\r
+\r
+ if (o.source_view && ed.getParam('fullpage_hide_in_source_view'))\r
+ return;\r
+\r
// Parse out head, body and footer\r
c = c.replace(/<(\/?)BODY/gi, '<$1body');\r
sp = c.indexOf('<body');\r
_getContent : function(ed, o) {\r
var t = this;\r
\r
- o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot);\r
+ if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view'))\r
+ o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot);\r
}\r
});\r
\r
// Register plugin\r
tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin);\r
-})();\r
+})();
\ No newline at end of file