js/jqte/uncompressed/jquery-te-1.4.0.js
function buttonEmphasize(e)
			{
				for(var n = 0; n < buttons.length; n++)
				{				
					if(vars[buttons[n].name] && buttons[n].emphasis && buttons[n].tag!='')
						detectElement(buttons[n].tag) ? toolbar.find('.'+vars.css+'_tool_'+buttons[n].cls).addClass(emphasize) : $('.'+vars.css+'_tool_'+buttons[n].cls).removeClass(emphasize);
				}
				// showing text format
				if(vars.format && $.isArray(vars.formats))
				{
					var isFoundFormat = false;
					
					for(var f = 0; f < vars.formats.length; f++)
					{
						var thisFormat = [];
						thisFormat[0] = vars.formats[f][0];
						
						if(vars.formats[f][0].length>0 && detectElement(thisFormat))
						{
							formatLabelView(vars.formats[f][1]);
							
							isFoundFormat = true;
							break;
						}
					}
					
					if(!isFoundFormat)
						formatLabelView(vars.formats[0][1]);
				}
				
				// hide all style-fields
				styleFieldSwitch("",false);
				formatFieldSwitch(false);
			}
function buttonEmphasize(e)
			{
				for(var n = 0; n < buttons.length; n++)
				{				
					if(vars[buttons[n].name] && buttons[n].emphasis && buttons[n].tag!='')
						detectElement(buttons[n].tag) ? toolbar.find('.'+vars.css+'_tool_'+buttons[n].cls).addClass(emphasize) : $('.'+vars.css+'_tool_'+buttons[n].cls).removeClass(emphasize);
				}
				// showing text format
				if(vars.format && $.isArray(vars.formats))
				{
					var isFoundFormat = false;
					
					for(var f = 0; f < vars.formats.length; f++)
					{
						var thisFormat = [];
						thisFormat[0] = vars.formats[f][0];
						
						if(vars.formats[f][0].length>0 && detectElement(thisFormat))
						{
							formatLabelView(vars.formats[f][1]);
							
							isFoundFormat = true;
							break;
						}
					}
					
					if(!isFoundFormat)
						formatLabelView(vars.formats[0][1]);
				}
				
				// hide all style-fields
				styleFieldSwitch("",false);
				formatFieldSwitch(false);
			}
function buttonEmphasize ( e ) { for ( var n = 0 ; n < buttons . length ; n ++ ) { if ( vars [ buttons [ n ] . name ] && buttons [ n ] . emphasis && buttons [ n ] . tag != '' ) detectElement ( buttons [ n ] . tag ) ? toolbar . find ( '.' + vars . css + '_tool_' + buttons [ n ] . cls ) . addClass ( emphasize ) : $ ( '.' + vars . css + '_tool_' + buttons [ n ] . cls ) . removeClass ( emphasize ) ; } // showing text format
 if ( vars . format && $ . isArray ( vars . formats ) ) { var isFoundFormat = false ; for ( var f = 0 ; f < vars . formats . length ; f ++ ) { var thisFormat = [ ] ; thisFormat [ 0 ] = vars . formats [ f ] [ 0 ] ; if ( vars . formats [ f ] [ 0 ] . length > 0 && detectElement ( thisFormat ) ) { formatLabelView ( vars . formats [ f ] [ 1 ] ) ; isFoundFormat = true ; break ; } } if ( ! isFoundFormat ) formatLabelView ( vars . formats [ 0 ] [ 1 ] ) ; } // hide all style-fields
 styleFieldSwitch ( "" , false ) ; formatFieldSwitch ( false ) ; }
the function of highlighting the toolbar buttons according to the cursor position in jqte editor
the function of highlighting the toolbar buttons according to the cursor position in jqte editor