WIP: add support for returning module contents as HTML

Makes debugging a bit easier since webview is not required (and you do not have to sift through escaped HTML in JSON)

This still needs tests and probably has bugs like:

- what to do when the content is a collection
- pattern matching fails when trying to include file extensions