Add HTML fragment support

I'm using DTRichTextEditor and needed a way to retrieve html fragments with inlined styles. Please let me know if there's something I should correct in the commit in terms of style, etc.