Add actions to text pieces