added maxWidth support for HtmlText