Fix issue with html/text formatting switch

div wasn't identify correctly