@Override
	public void actionPerformed(ActionEvent e) {
		if (e.getSource().equals(okButton))
		{
			returnString = textArea.getText().replace("\n", " <g> ");
			this.setVisible(false);
		}
		
		if (e.getSource().equals(cancelButton))
		{
			returnString = originalText;
			this.setVisible(false);
		}
		
		if (e.getSource().equals(keywordButton))
		{
			textArea.insert("<k>", textArea.getCaretPosition());
		}
		
		if (e.getSource().equals(regularButton))
		{
			textArea.insert("<r>", textArea.getCaretPosition());
		}
		
		if (e.getSource().equals(focusButton))
		{
			textArea.insert("⟶", textArea.getCaretPosition());
		}
		
		if (e.getSource().equals(headingButton))
		{
			textArea.insert("<h></h>", textArea.getCaretPosition());
		}
		
		if (e.getSource().equals(headerIconButton))
		{
			textArea.insert("<hi icon= value= />", textArea.getCaretPosition());
		}
		
		if (e.getSource().equals(addButton))
		{
			textArea.insert("<" + ((Icon)iconCombo.getSelectedItem()).getEnumName() + ">", textArea.getCaretPosition());
		}
	}