Add support for HTML/text mode