Add plaintext support to text viewer