Allow preview for HTML documents.

Closes #774