Add text handlers for ports.