static/tinymce/plugins/fullpage/editor_plugin_src.js
function() {
			var headerFragment = this._parseHeader(), data = {}, nodes, elm, matches, editor = this.editor;

			function getAttr(elm, name) {
				var value = elm.attr(name);

				return value || '';
			};

			// Default some values
			data.fontface = editor.getParam("fullpage_default_fontface", "");
			data.fontsize = editor.getParam("fullpage_default_fontsize", "");

			// Parse XML PI
			elm = headerFragment.firstChild;
			if (elm.type == 7) {
				data.xml_pi = true;
				matches = /encoding="([^"]+)"/.exec(elm.value);
				if (matches)
					data.docencoding = matches[1];
			}

			// Parse doctype
			elm = headerFragment.getAll('#doctype')[0];
			if (elm)
				data.doctype = '<!DOCTYPE' + elm.value + ">"; 

			// Parse title element
			elm = headerFragment.getAll('title')[0];
			if (elm && elm.firstChild) {
				data.metatitle = elm.firstChild.value;
			}

			// Parse meta elements
			each(headerFragment.getAll('meta'), function(meta) {
				var name = meta.attr('name'), httpEquiv = meta.attr('http-equiv'), matches;

				if (name)
					data['meta' + name.toLowerCase()] = meta.attr('content');
				else if (httpEquiv == "Content-Type") {
					matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content'));

					if (matches)
						data.docencoding = matches[1];
				}
			});

			// Parse html attribs
			elm = headerFragment.getAll('html')[0];
			if (elm)
				data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang');
	
			// Parse stylesheet
			elm = headerFragment.getAll('link')[0];
			if (elm && elm.attr('rel') == 'stylesheet')
				data.stylesheet = elm.attr('href');

			// Parse body parts
			elm = headerFragment.getAll('body')[0];
			if (elm) {
				data.langdir = getAttr(elm, 'dir');
				data.style = getAttr(elm, 'style');
				data.visited_color = getAttr(elm, 'vlink');
				data.link_color = getAttr(elm, 'link');
				data.active_color = getAttr(elm, 'alink');
			}

			return data;
		}
function() {
			var headerFragment = this._parseHeader(), data = {}, nodes, elm, matches, editor = this.editor;

			function getAttr(elm, name) {
				var value = elm.attr(name);

				return value || '';
			};

			// Default some values
			data.fontface = editor.getParam("fullpage_default_fontface", "");
			data.fontsize = editor.getParam("fullpage_default_fontsize", "");

			// Parse XML PI
			elm = headerFragment.firstChild;
			if (elm.type == 7) {
				data.xml_pi = true;
				matches = /encoding="([^"]+)"/.exec(elm.value);
				if (matches)
					data.docencoding = matches[1];
			}

			// Parse doctype
			elm = headerFragment.getAll('#doctype')[0];
			if (elm)
				data.doctype = '<!DOCTYPE' + elm.value + ">"; 

			// Parse title element
			elm = headerFragment.getAll('title')[0];
			if (elm && elm.firstChild) {
				data.metatitle = elm.firstChild.value;
			}

			// Parse meta elements
			each(headerFragment.getAll('meta'), function(meta) {
				var name = meta.attr('name'), httpEquiv = meta.attr('http-equiv'), matches;

				if (name)
					data['meta' + name.toLowerCase()] = meta.attr('content');
				else if (httpEquiv == "Content-Type") {
					matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content'));

					if (matches)
						data.docencoding = matches[1];
				}
			});

			// Parse html attribs
			elm = headerFragment.getAll('html')[0];
			if (elm)
				data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang');
	
			// Parse stylesheet
			elm = headerFragment.getAll('link')[0];
			if (elm && elm.attr('rel') == 'stylesheet')
				data.stylesheet = elm.attr('href');

			// Parse body parts
			elm = headerFragment.getAll('body')[0];
			if (elm) {
				data.langdir = getAttr(elm, 'dir');
				data.style = getAttr(elm, 'style');
				data.visited_color = getAttr(elm, 'vlink');
				data.link_color = getAttr(elm, 'link');
				data.active_color = getAttr(elm, 'alink');
			}

			return data;
		}
function ( ) { var headerFragment = this . _parseHeader ( ) , data = { } , nodes , elm , matches , editor = this . editor ; function getAttr ( elm , name ) { var value = elm . attr ( name ) ; return value || '' ; } ; // Default some values
 data . fontface = editor . getParam ( "fullpage_default_fontface" , "" ) ; data . fontsize = editor . getParam ( "fullpage_default_fontsize" , "" ) ; // Parse XML PI
 elm = headerFragment . firstChild ; if ( elm . type == 7 ) { data . xml_pi = true ; matches = / encoding="([^"]+)" / . exec ( elm . value ) ; if ( matches ) data . docencoding = matches [ 1 ] ; } // Parse doctype
 elm = headerFragment . getAll ( '#doctype' ) [ 0 ] ; if ( elm ) data . doctype = '<!DOCTYPE' + elm . value + ">" ; // Parse title element
 elm = headerFragment . getAll ( 'title' ) [ 0 ] ; if ( elm && elm . firstChild ) { data . metatitle = elm . firstChild . value ; } // Parse meta elements
 each ( headerFragment . getAll ( 'meta' ) , function ( meta ) { var name = meta . attr ( 'name' ) , httpEquiv = meta . attr ( 'http-equiv' ) , matches ; if ( name ) data [ 'meta' + name . toLowerCase ( ) ] = meta . attr ( 'content' ) ; else if ( httpEquiv == "Content-Type" ) { matches = / charset\s*=\s*(.*)\s* / gi . exec ( meta . attr ( 'content' ) ) ; if ( matches ) data . docencoding = matches [ 1 ] ; } } ) ; // Parse html attribs
 elm = headerFragment . getAll ( 'html' ) [ 0 ] ; if ( elm ) data . langcode = getAttr ( elm , 'lang' ) || getAttr ( elm , 'xml:lang' ) ; // Parse stylesheet
 elm = headerFragment . getAll ( 'link' ) [ 0 ] ; if ( elm && elm . attr ( 'rel' ) == 'stylesheet' ) data . stylesheet = elm . attr ( 'href' ) ; // Parse body parts
 elm = headerFragment . getAll ( 'body' ) [ 0 ] ; if ( elm ) { data . langdir = getAttr ( elm , 'dir' ) ; data . style = getAttr ( elm , 'style' ) ; data . visited_color = getAttr ( elm , 'vlink' ) ; data . link_color = getAttr ( elm , 'link' ) ; data . active_color = getAttr ( elm , 'alink' ) ; } return data ; }
Private plugin internal methods
Private plugin internal methods