rem: _insertWordContent : function(content) { if (content && content.length > 0) {  var bull = String.fromCharCode(8226); var middot = String.fromCharCode(183); var cb;  if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "") content = eval(cb + "('before', content)");  var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(','); for (var i=0; i<rl.length; i+=2) content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);  if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) { content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>'); }  content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--"); content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>"); content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); content = content.replace(/<o:p><\/o:p>/gi, ""); content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); content = content.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), "");  if (tinyMCE.getParam("paste_remove_spans", true)) content = content.replace(/<\/?span[^>]*>/gi, "");  if (tinyMCE.getParam("paste_remove_styles", true)) content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3");  content = content.replace(/<\/?font[^>]*>/gi, "");   switch (tinyMCE.getParam("paste_strip_class_attributes", "all")) { case "all": content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3"); break;  case "mso": content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3"); break; }  content = content.replace(new RegExp('href="?' + TinyMCE_PastePlugin._reEscape("" + document.location) + '', 'gi'), 'href="' + tinyMCE.settings['document_base_url']); content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3"); content = content.replace(/<\\?\?xml[^>]*>/gi, ""); content = content.replace(/<\/?\w+:[^>]*>/gi, ""); content = content.replace(/-- page break --\s*<p>&nbsp;<\/p>/gi, ""); content = content.replace(/-- page break --/gi, "");     if (!tinyMCE.settings['force_p_newlines']) { content = content.replace('', '' ,'gi'); content = content.replace('</p>', '<br /><br />' ,'gi'); }  if (!tinyMCE.isMSIE && !tinyMCE.settings['force_p_newlines']) { content = content.replace(/<\/?p[^>]*>/gi, ""); }  content = content.replace(/<\/?div[^>]*>/gi, "");   if (tinyMCE.getParam("paste_convert_middot_lists", true)) { var div = document.createElement("div"); div.innerHTML = content;   var className = tinyMCE.getParam("paste_unindented_list_class", "unIndentedList");  while (TinyMCE_PastePlugin._convertMiddots(div, "--list--")) ; while (TinyMCE_PastePlugin._convertMiddots(div, middot, className)) ; while (TinyMCE_PastePlugin._convertMiddots(div, bull)) ;  content = div.innerHTML; }   if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) { content = content.replace(/<h[1-6]>&nbsp;<\/h[1-6]>/gi, '<p>&nbsp;&nbsp;</p>'); content = content.replace(/<h[1-6]>/gi, '<p><b>'); content = content.replace(/<\/h[1-6]>/gi, '</b></p>'); content = content.replace(/<b>&nbsp;<\/b>/gi, '<b>&nbsp;&nbsp;</b>'); content = content.replace(/^(&nbsp;)*/gi, ''); }  content = content.replace(/--list--/gi, "");  if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "") content = eval(cb + "('after', content)");   tinyMCE.execCommand("mceInsertContent", false, content); window.setTimeout('tinyMCE.execCommand("mceCleanup");', 1); } }, 
add: tinyMCE.importPluginLanguagePack('paste','en,tr,sv,cs,zh_cn,fr_ca,da,he,nb,de,hu,ru,ru_KOI8-R,ru_UTF-8,nn,fi,es,cy,is,pl,nl,fr,pt_br');var TinyMCE_PastePlugin={getInfo:function(){return{longname:'Paste text/word',author:'Moxiecode Systems',authorurl:'http: 
context: 	_insertWordContent : function(content) { 		if (content && content.length > 0) {			// Cleanup Word content			var bull = String.fromCharCode(8226);			var middot = String.fromCharCode(183);			var cb;			if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")				content = eval(cb + "('before', content)");			var rl = tinyMCE.getParam("paste_replace_list", '\u2122,<sup>TM</sup>,\u2026,...,\u201c|\u201d,",\u2019,\',\u2013|\u2014|\u2015|\u2212,-').split(',');			for (var i=0; i<rl.length; i+=2)				content = content.replace(new RegExp(rl[i], 'gi'), rl[i+1]);			if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {				content = content.replace(new RegExp('<p class=MsoHeading.*?>(.*?)<\/p>', 'gi'), '<p><b>$1</b></p>');			}			content = content.replace(new RegExp('tab-stops: list [0-9]+.0pt">', 'gi'), '">' + "--list--");			content = content.replace(new RegExp(bull + "(.*?)<BR>", "gi"), "<p>" + middot + "$1</p>");			content = content.replace(new RegExp('<SPAN style="mso-list: Ignore">', 'gi'), "<span>" + bull); // Covert to bull list			content = content.replace(/<o:p><\/o:p>/gi, "");			content = content.replace(new RegExp('<br style="page-break-before: always;.*>', 'gi'), '-- page break --'); // Replace pagebreaks			content = content.replace(new RegExp('<(!--)([^>]*)(--)>', 'g'), "");  // Word comments			if (tinyMCE.getParam("paste_remove_spans", true))				content = content.replace(/<\/?span[^>]*>/gi, "");			if (tinyMCE.getParam("paste_remove_styles", true))				content = content.replace(new RegExp('<(\\w[^>]*) style="([^"]*)"([^>]*)', 'gi'), "<$1$3");			content = content.replace(/<\/?font[^>]*>/gi, "");			// Strips class attributes.			switch (tinyMCE.getParam("paste_strip_class_attributes", "all")) {				case "all":					content = content.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3");					break;				case "mso":					content = content.replace(new RegExp('<(\\w[^>]*) class="?mso([^ |>]*)([^>]*)', 'gi'), "<$1$3");					break;			}			content = content.replace(new RegExp('href="?' + TinyMCE_PastePlugin._reEscape("" + document.location) + '', 'gi'), 'href="' + tinyMCE.settings['document_base_url']);			content = content.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3");			content = content.replace(/<\\?\?xml[^>]*>/gi, "");			content = content.replace(/<\/?\w+:[^>]*>/gi, "");			content = content.replace(/-- page break --\s*<p>&nbsp;<\/p>/gi, ""); // Remove pagebreaks			content = content.replace(/-- page break --/gi, ""); // Remove pagebreaks	//		content = content.replace(/\/?&nbsp;*/gi, ""); &nbsp;	//		content = content.replace(/<p>&nbsp;<\/p>/gi, '');			if (!tinyMCE.settings['force_p_newlines']) {				content = content.replace('', '' ,'gi');				content = content.replace('</p>', '<br /><br />' ,'gi');			}			if (!tinyMCE.isMSIE && !tinyMCE.settings['force_p_newlines']) {				content = content.replace(/<\/?p[^>]*>/gi, "");			}			content = content.replace(/<\/?div[^>]*>/gi, "");			// Convert all middlot lists to UL lists			if (tinyMCE.getParam("paste_convert_middot_lists", true)) {				var div = document.createElement("div");				div.innerHTML = content;				// Convert all middot paragraphs to li elements				var className = tinyMCE.getParam("paste_unindented_list_class", "unIndentedList");				while (TinyMCE_PastePlugin._convertMiddots(div, "--list--")) ; // bull				while (TinyMCE_PastePlugin._convertMiddots(div, middot, className)) ; // Middot				while (TinyMCE_PastePlugin._convertMiddots(div, bull)) ; // bull				content = div.innerHTML;			}			// Replace all headers with strong and fix some other issues			if (tinyMCE.getParam("paste_convert_headers_to_strong", false)) {				content = content.replace(/<h[1-6]>&nbsp;<\/h[1-6]>/gi, '<p>&nbsp;&nbsp;</p>');				content = content.replace(/<h[1-6]>/gi, '<p><b>');				content = content.replace(/<\/h[1-6]>/gi, '</b></p>');				content = content.replace(/<b>&nbsp;<\/b>/gi, '<b>&nbsp;&nbsp;</b>');				content = content.replace(/^(&nbsp;)*/gi, '');			}			content = content.replace(/--list--/gi, ""); // Remove --list--			if ((cb = tinyMCE.getParam("paste_insert_word_content_callback", "")) != "")				content = eval(cb + "('after', content)");			// Insert cleaned content			tinyMCE.execCommand("mceInsertContent", false, content);			window.setTimeout('tinyMCE.execCommand("mceCleanup");', 1); // Do normal cleanup detached from this thread		}	},
meta: 10574	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10574/b88a2b04360b7a262b15c8d6334bb9b5cc5a46d9/editor_plugin.js/clean/wp-includes/js/tinymce/plugins/paste/editor_plugin.js