includes/clientside/tinymce/plugins/fullpage/editor_plugin_src.js
changeset 1193 e3b94bd055dc
parent 778 57ce13805b6f
equal deleted inserted replaced
1192:5882f0eebb34 1193:e3b94bd055dc
     1 /**
     1 /**
     2  * $Id: editor_plugin_src.js 920 2008-09-09 14:05:33Z spocke $
     2  * $Id: editor_plugin_src.js 1029 2009-02-24 22:32:21Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
    80 		},
    80 		},
    81 
    81 
    82 		_setContent : function(ed, o) {
    82 		_setContent : function(ed, o) {
    83 			var t = this, sp, ep, c = o.content, v, st = '';
    83 			var t = this, sp, ep, c = o.content, v, st = '';
    84 
    84 
       
    85 			if (o.source_view && ed.getParam('fullpage_hide_in_source_view'))
       
    86 				return;
       
    87 
    85 			// Parse out head, body and footer
    88 			// Parse out head, body and footer
    86 			c = c.replace(/<(\/?)BODY/gi, '<$1body');
    89 			c = c.replace(/<(\/?)BODY/gi, '<$1body');
    87 			sp = c.indexOf('<body');
    90 			sp = c.indexOf('<body');
    88 
    91 
    89 			if (sp != -1) {
    92 			if (sp != -1) {
   131 		},
   134 		},
   132 
   135 
   133 		_getContent : function(ed, o) {
   136 		_getContent : function(ed, o) {
   134 			var t = this;
   137 			var t = this;
   135 
   138 
   136 			o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot);
   139 			if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view'))
       
   140 				o.content = tinymce.trim(t.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(t.foot);
   137 		}
   141 		}
   138 	});
   142 	});
   139 
   143 
   140 	// Register plugin
   144 	// Register plugin
   141 	tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin);
   145 	tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin);