switched chat from htmlDocument to styledDocument