js/jqte/uncompressed/jquery-te-1.4.0.js
function extractToText(strings)
			{
				var $htmlContent, $htmlPattern, $htmlReplace;

				// first remove to unnecessary gaps
				$htmlContent = strings.replace(/\n/gim,'').replace(/\r/gim,'').replace(/\t/gim,'').replace(/&nbsp;/gim,' ');

				$htmlPattern =  [
					/\<span(|\s+.*?)><span(|\s+.*?)>(.*?)<\/span><\/span>/gim, // trim nested spans
					/<(\w*[^p])\s*[^\/>]*>\s*<\/\1>/gim, // remove empty or white-spaces tags (ignore paragraphs (<p>) and breaks (<br>))
					/\<div(|\s+.*?)>(.*?)\<\/div>/gim, // convert div to p
					/\<strong(|\s+.*?)>(.*?)\<\/strong>/gim, // convert strong to b
					/\<em(|\s+.*?)>(.*?)\<\/em>/gim // convert em to i
				];

				$htmlReplace = [
					'<span$2>$3</span>',
					'',
					'<p$1>$2</p>',
					'<b$1>$2</b>',
					'<i$1>$2</i>'
				];
				
				// repeat the cleaning process 5 times
				for(c=0; c<5; c++)
				{
					// create loop as the number of pattern
					for(var i = 0; i < $htmlPattern.length; i++)
					{
						$htmlContent = $htmlContent.replace($htmlPattern[i], $htmlReplace[i]);
					}
				}

				// if paragraph is false (<p>), convert <p> to <br>
				if(!vars.p)
					$htmlContent = $htmlContent.replace(/\<p(|\s+.*?)>(.*?)\<\/p>/ig, '<br/>$2');

				// if break is false (<br>), convert <br> to <p>
				if(!vars.br)
				{
					$htmlPattern =  [
						/\<br>(.*?)/ig,
						/\<br\/>(.*?)/ig
					];

					$htmlReplace = [
						'<p>$1</p>',
						'<p>$1</p>'
					];

					// create loop as the number of pattern (for breaks)
					for (var i = 0; i < $htmlPattern.length; i++) {
						$htmlContent = $htmlContent.replace($htmlPattern[i], $htmlReplace[i]);
					}
				}

				// if paragraph and break is false (<p> && <br>), convert <p> to <div>
				if(!vars.p && !vars.br)
					$htmlContent = $htmlContent.replace(/\<p>(.*?)\<\/p>/ig, '<div>$1</div>');

				return $htmlContent;
			}
function extractToText(strings)
			{
				var $htmlContent, $htmlPattern, $htmlReplace;

				// first remove to unnecessary gaps
				$htmlContent = strings.replace(/\n/gim,'').replace(/\r/gim,'').replace(/\t/gim,'').replace(/&nbsp;/gim,' ');

				$htmlPattern =  [
					/\<span(|\s+.*?)><span(|\s+.*?)>(.*?)<\/span><\/span>/gim, // trim nested spans
					/<(\w*[^p])\s*[^\/>]*>\s*<\/\1>/gim, // remove empty or white-spaces tags (ignore paragraphs (<p>) and breaks (<br>))
					/\<div(|\s+.*?)>(.*?)\<\/div>/gim, // convert div to p
					/\<strong(|\s+.*?)>(.*?)\<\/strong>/gim, // convert strong to b
					/\<em(|\s+.*?)>(.*?)\<\/em>/gim // convert em to i
				];

				$htmlReplace = [
					'<span$2>$3</span>',
					'',
					'<p$1>$2</p>',
					'<b$1>$2</b>',
					'<i$1>$2</i>'
				];
				
				// repeat the cleaning process 5 times
				for(c=0; c<5; c++)
				{
					// create loop as the number of pattern
					for(var i = 0; i < $htmlPattern.length; i++)
					{
						$htmlContent = $htmlContent.replace($htmlPattern[i], $htmlReplace[i]);
					}
				}

				// if paragraph is false (<p>), convert <p> to <br>
				if(!vars.p)
					$htmlContent = $htmlContent.replace(/\<p(|\s+.*?)>(.*?)\<\/p>/ig, '<br/>$2');

				// if break is false (<br>), convert <br> to <p>
				if(!vars.br)
				{
					$htmlPattern =  [
						/\<br>(.*?)/ig,
						/\<br\/>(.*?)/ig
					];

					$htmlReplace = [
						'<p>$1</p>',
						'<p>$1</p>'
					];

					// create loop as the number of pattern (for breaks)
					for (var i = 0; i < $htmlPattern.length; i++) {
						$htmlContent = $htmlContent.replace($htmlPattern[i], $htmlReplace[i]);
					}
				}

				// if paragraph and break is false (<p> && <br>), convert <p> to <div>
				if(!vars.p && !vars.br)
					$htmlContent = $htmlContent.replace(/\<p>(.*?)\<\/p>/ig, '<div>$1</div>');

				return $htmlContent;
			}
function extractToText ( strings ) { var $htmlContent , $htmlPattern , $htmlReplace ; // first remove to unnecessary gaps
 $htmlContent = strings . replace ( / \n / gim , '' ) . replace ( / \r / gim , '' ) . replace ( / \t / gim , '' ) . replace ( / &nbsp; / gim , ' ' ) ; $htmlPattern = [ / \<span(|\s+.*?)><span(|\s+.*?)>(.*?)<\/span><\/span> / gim , // trim nested spans
 / <(\w*[^p])\s*[^\/>]*>\s*<\/\1> / gim , // remove empty or white-spaces tags (ignore paragraphs (<p>) and breaks (<br>))
 / \<div(|\s+.*?)>(.*?)\<\/div> / gim , // convert div to p
 / \<strong(|\s+.*?)>(.*?)\<\/strong> / gim , // convert strong to b
 / \<em(|\s+.*?)>(.*?)\<\/em> / gim // convert em to i
 ] ; $htmlReplace = [ '<span$2>$3</span>' , '' , '<p$1>$2</p>' , '<b$1>$2</b>' , '<i$1>$2</i>' ] ; // repeat the cleaning process 5 times
 for ( c = 0 ; c < 5 ; c ++ ) { // create loop as the number of pattern
 for ( var i = 0 ; i < $htmlPattern . length ; i ++ ) { $htmlContent = $htmlContent . replace ( $htmlPattern [ i ] , $htmlReplace [ i ] ) ; } } // if paragraph is false (<p>), convert <p> to <br>
 if ( ! vars . p ) $htmlContent = $htmlContent . replace ( / \<p(|\s+.*?)>(.*?)\<\/p> / ig , '<br/>$2' ) ; // if break is false (<br>), convert <br> to <p>
 if ( ! vars . br ) { $htmlPattern = [ / \<br>(.*?) / ig , / \<br\/>(.*?) / ig ] ; $htmlReplace = [ '<p>$1</p>' , '<p>$1</p>' ] ; // create loop as the number of pattern (for breaks)
 for ( var i = 0 ; i < $htmlPattern . length ; i ++ ) { $htmlContent = $htmlContent . replace ( $htmlPattern [ i ] , $htmlReplace [ i ] ) ; } } // if paragraph and break is false (<p> && <br>), convert <p> to <div>
 if ( ! vars . p && ! vars . br ) $htmlContent = $htmlContent . replace ( / \<p>(.*?)\<\/p> / ig , '<div>$1</div>' ) ; return $htmlContent ; }
the function of insertion a specific form to texts
the function of insertion a specific form to texts