@Override
	public void encodeBegin(FacesContext context, UIComponent component)
			throws IOException {
		if (!(component.isRendered() && component instanceof AbstractInsert))
			return;
		AbstractInsert newButton = (AbstractInsert) component;

		
		String highlight =newButton.getHighlight();
		String content =newButton.getContent();
		String src =newButton.getSrc();
		ResponseWriter writer = context.getResponseWriter();
		writer.startElement("div", newButton);
		String hXml="";
		if (content!=null)
		{

			hXml = getHighLightedDocumentString(highlight,content );
			
		}
		else if(src!=null)
		{
			hXml = getHighLightedDocumentStringFromFile(src);
		}
		
		writer.write(hXml);
		
		//System.out.println(hXml);
		
		writer.endElement("div");
	}