Added listeners to text edit buttons

added listeners and fixed bug where a click will toggle buttons to hide.