render text and markdown in filepreview