js/jqte/uncompressed/jquery-te-1.4.0.js
function selectionSet(addCommand,thirdParam)
			{
				var	range,
					sel = selectionGet();

				// for webkit, mozilla, opera
				if (window.getSelection)
				{
					if (sel.anchorNode && sel.getRangeAt)
						range = sel.getRangeAt(0);
						
					if(range)
					{
						sel.removeAllRanges();
						sel.addRange(range);
					}
					
					if(!thisBrowser.match(/msie/))
						document.execCommand('StyleWithCSS', false, false);
					
					document.execCommand(addCommand, false, thirdParam);
				}
				
				// for ie
				else if (document.selection && document.selection.createRange && document.selection.type != "None")
				{
					range = document.selection.createRange();
					range.execCommand(addCommand, false, thirdParam);
				}
				
				// change styles to around tags
				affectStyleAround(false,false);
			}
function selectionSet(addCommand,thirdParam)
			{
				var	range,
					sel = selectionGet();

				// for webkit, mozilla, opera
				if (window.getSelection)
				{
					if (sel.anchorNode && sel.getRangeAt)
						range = sel.getRangeAt(0);
						
					if(range)
					{
						sel.removeAllRanges();
						sel.addRange(range);
					}
					
					if(!thisBrowser.match(/msie/))
						document.execCommand('StyleWithCSS', false, false);
					
					document.execCommand(addCommand, false, thirdParam);
				}
				
				// for ie
				else if (document.selection && document.selection.createRange && document.selection.type != "None")
				{
					range = document.selection.createRange();
					range.execCommand(addCommand, false, thirdParam);
				}
				
				// change styles to around tags
				affectStyleAround(false,false);
			}
function selectionSet ( addCommand , thirdParam ) { var range , sel = selectionGet ( ) ; // for webkit, mozilla, opera
 if ( window . getSelection ) { if ( sel . anchorNode && sel . getRangeAt ) range = sel . getRangeAt ( 0 ) ; if ( range ) { sel . removeAllRanges ( ) ; sel . addRange ( range ) ; } if ( ! thisBrowser . match ( / msie / ) ) document . execCommand ( 'StyleWithCSS' , false , false ) ; document . execCommand ( addCommand , false , thirdParam ) ; } // for ie
 else if ( document . selection && document . selection . createRange && document . selection . type != "None" ) { range = document . selection . createRange ( ) ; range . execCommand ( addCommand , false , thirdParam ) ; } // change styles to around tags
 affectStyleAround ( false , false ) ; }
the function of changing to the selected text with "execCommand" method
the function of changing to the selected text with execCommand method